Results 1 to 17 of 17

Thread: CSS: IE & FireFox (Hidden Items) -[RESOLVED]-

  1. #1

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    CSS: IE & FireFox (Hidden Items) -[RESOLVED]-

    On my navigation bar on my site I have a rollover of the images, to preload the images "before" the user rolls over them I include them after the image. But I use a CSS file with this linein to stop them actually being displayed (kinda like forcing it to cache the image so its ready).
    Code:
    #HiddenItems          { VISIBILITY: Hidden; DISPLAY: none;       }
    The only thing is I have came to install FireFox (eventually) and when I viewed my site I noticed that this does remove the images anymore and results in 3 navigation bars one after another.

    Does anyone know a way to set something invisible that works accross browsers?

    Thanx.
    Last edited by Electroman; May 2nd, 2004 at 02:47 PM.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    I've always used visibility: hidden;

    it might be case sensitive. try all lower case.

    also, you onMouseLeave should be onMouseOut.

    one thing about hiding them is that the page still makes room for them. which could cause scrollbars to appear even though when the user scrolls down there is nothing there.
    Have I helped you? Please Rate my posts.

  3. #3

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Did you try using IE to view it? cause its the display one that stops it reserving space I think. Also the "onmouseleave" seems to work on IE, will "onMouseOut" work on both? Well I'm about to try it anyway....
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  4. #4

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Nope, changing the case didn't change anything. The onMouseOut works on both though . Even though the animation goes straignt to the last frame in FireFox .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    onmouseleave is IE-proprietary.

    CSS is case-insensitive, as far as the host language (HTML or XHTML, usually) permits it: element names are case-insensitive when linking to HTML because they are insensitive there, but case-sensitive when linking to XHTML because they're sensitive there.

    Is HiddenItems the id? If it's only the name then that would be a reason why it would work in IE and not in Mozilla (maybe, I see this behaviour with document.getElementById).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Posted by CornedBee
    Is HiddenItems the id? If it's only the name then that would be a reason why it would work in IE and not in Mozilla.
    yes the code for the hidden items is:
    Code:
          <SPAN id='HiddenItems'>
           <IMG SRC='Images/Logo1.gif'><br>
           <IMG SRC='Images/Examples1.gif'><br>
           <IMG SRC='Images/Articles1.gif'><br>
           <IMG SRC='Images/Electro2DE1.gif'><br>
           <IMG SRC='Images/Projects1.gif'><br>
           <IMG SRC='Images/PCCase1.gif'><br>
           <IMG SRC='Images/Logo2.gif'><br>
           <IMG SRC='Images/Examples2.gif'><br>
           <IMG SRC='Images/Articles2.gif'><br>
           <IMG SRC='Images/Electro2DE2.gif'><br>
           <IMG SRC='Images/Projects2.gif'><br>
           <IMG SRC='Images/PCCase2.gif'><br>
          </SPAN>
    Posted by CornedBee
    maybe, I see this behaviour with document.getElementById
    Sorry you lost me there, I've seen this used somewhere before but dont remember where or know what its for .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  7. #7
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    I'm not sure why the onMouseOver and onMouseOut are both skipping to the last frame. I tried validating your .css file. It said you're not allowed to change the colours of the scrolbars. But more importantly, is said parse error on this line, and many more:
    Code:
    #PageLink:Hover       { COLOR: Red;  }       BACKGROUND: Orange;  }
    You've closed those curly brackets twice, but only opened them once. This makes the parser not understand what's going on.
    Have I helped you? Please Rate my posts.

  8. #8

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Originally posted by Acidic
    I'm not sure why the onMouseOver and onMouseOut are both skipping to the last frame. I tried validating your .css file. It said you're not allowed to change the colours of the scrolbars. But more importantly, is said parse error on this line, and many more:
    Code:
    #PageLink:Hover       { COLOR: Red;  }       BACKGROUND: Orange;  }
    You've closed those curly brackets twice, but only opened them once. This makes the parser not understand what's going on.
    Ow I meant to delete that, opps. I used to have a style that used the background bit then I changed it when i redesigned my site. I just closed the bracket as a temp. thing (turned out not so temp ). I relied on the fact it was ignoring the stuff after the closing bracket., Will fix that now. Thanx
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  9. #9
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    also, in listing your updates. you have several spans with the same id. This is not allowed. Since you're using CSS to change the look of these it get's tricker to fix. CSS3 would do it, but IE doesn't support it.

    I'm not sure how to easily fix this problem.
    Have I helped you? Please Rate my posts.

  10. #10

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    I'm off to go and cry . That fixed it . Must have been messing it up having those bracket things . That'll teach me .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  11. #11

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Originally posted by Acidic
    also, in listing your updates. you have several spans with the same id. This is not allowed. Since you're using CSS to change the look of these it get's tricker to fix. CSS3 would do it, but IE doesn't support it.

    I'm not sure how to easily fix this problem.
    Using Classes, Thats one thing I've been meaning to do as well but haven't had time yet, will get round to it thiss week. The template would be easy to change the id's to classes but all the other files will use the id as well and its gonna take a while to search though all my pages to change it.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  12. #12
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    oh yeah, classes. I forgot about them. hehe, they are the most basic CSS thing there is.

    edit: As to the images skipping to the last frame. try change the onMouseOver and onMouseOut to:
    Code:
    onMouseOver="this.src='myImg.jpg'"
    or:
    onMouseOut="this.src='myImg.jpg'"
    Have I helped you? Please Rate my posts.

  13. #13

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Originally posted by Acidic
    oh yeah, classes. I forgot about them. hehe, they are the most basic CSS thing there is.

    edit: As to the images skipping to the last frame. try change the onMouseOver and onMouseOut to:
    Code:
    onMouseOver="this.src='myImg.jpg'"
    or:
    onMouseOut="this.src='myImg.jpg'"
    No luck unfortunetly, as you can see I changed it for the projects button.

    Thinking of it normally when there is more than one image of the same animation they all run in sync, well if its still animated the Hidden ones they will be on the last frame always cos the animation isn't a looping one. Haven't got a clue how to solve that apart from removing the hiddenitems in the first place.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  14. #14
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    Originally posted by Electroman
    Haven't got a clue how to solve that apart from removing the hiddenitems in the first place.
    I don't suppose you want a flash thingy on the site?
    Have I helped you? Please Rate my posts.

  15. #15

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    I don't know any flash .
    I dunno I think when I have time to learn to use flash I might do. Probably be in the summer now before I have a chance to make any major chnages to my site.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  16. #16
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    Action script (the code in flash files) is very similair to JavaScript. Designing flash requires artistic skill though, I don't have this. Luckily I know people who do.

    Anways, there should be a way of solving this without flash. I just can't think of it.

    Well. At least we got the hidden thing working.
    Have I helped you? Please Rate my posts.

  17. #17

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Yeah I nearly forgot about the resolved thing there.
    BTW I dont really know any javascript, just little snipits. I know C++, VB & PHP, thats about it .
    yeah I can't really draw too well either.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width