Forum Moderators: not2easy
i have a problem..... i have a style sheet i have been working on ........ i have hit a brick wall.... i would like to set a style sheet (done) but i would like to tell a div to only show on allocated pages and not the rest. (my main problem is i cant access each page as its part of a subscription where they have the basics and i can access and code other parts......if that makes any sense lol )
sooo i was hoping ;) to put in some line of code that says this div is visible on [domain.com...] and manually put in each page it can show on (it needs to have each page listed in its full url or it wont work )
is it possible ?
i hope so or i have to do a work around and this site i am a subscriber of well....... lets just say their coding is from another planet... not well coded css and alot clashes that shouldn't or if i check areas to show something it just decides to show it elsewhere depending on its mood LMAO!
THANKS in ADVANCE and if its not possible i'd appreciate the honesty ;)
cheers
Kel
If this is the case, then suppose your div has an id of "foo". You could do this to hide it on all pages except page1:
#foo {
display: none;
}
#page1 #foo {
display: block;
}
If there is NOT an ancestor with a unique id for each page, then I think you're going to have to look at a JavaScript solution.
i thought of javascript too but .... i heard that with javascipt some browsers load the whole page then the javascript kicks in.. soooo i problem is i cant let this div show at all as it will really mess up the look of the pages its not meant to load in annnd... if someone has a slow connection it could be scary lol
its weird after lots of think i thought the way css is so flexible i thought for sure i'd find a simple code that says only show this div on:: http...../page1, http..../page4, http..../page7, etc and that would be that...
THANKS for the reply btw it is greatly appreciated!
cheers
kel