SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Images off

  1. #1
    SitePoint Zealot barleytwist's Avatar
    Join Date
    Dec 2005
    Location
    Lulworth, Dorset, UK
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Images off

    I've created a header graphic and in case the user has images set to no display I have created a hidden heading text to display under these conditions. It works fine except that I notice if the page is a little slow to load in the graphic, the hidden text header appears briefly. One might consider it a little annoying. It does not seen to be unusual to see web pages get displayed 'ad-hoc' as the page loads so maybe I'm concerned about nothing here.

    Is there a way of preventing the display until the graphic is fully loaded and displayed?

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wouldn't worry about it. In fact, I'd consider it a bonus! If the image takes a long time to load it's quite user friendly to supply a text version that's instantly visible.

    The only problem I can see with this is if the text equivalent doesn't match the graphic. That might be confusing for someone who gets to see both.
    Birnam wood is come to Dunsinane

  3. #3
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do this on my own site for two reasons:
    1) I can set the size of the alternate text in all browsers that have enough CSS support to see the rule.
    2) The image will load after the stylesheets with the other background images, so the content will load quicker.

    There is no good way to hide the text. I don't see why anyone would want to anyway.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  4. #4
    SitePoint Zealot barleytwist's Avatar
    Join Date
    Dec 2005
    Location
    Lulworth, Dorset, UK
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I will leave it for now.

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kravvitz View Post
    2) The image will load after the stylesheets with the other background images, so the content will load quicker.
    Hmm. I don't think the content will load any quicker using this. It's not like <img>s are blocking the HTML parser or anything. Additionally style sheets generally load before the content on the page.
    Simon Pieters

  6. #6
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... Maybe you're right. It does make sure that (at least some of) the stylesheets have loaded before that background image does though.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

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