1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Question about text-indent and text hiding.

Discussion in 'HTML & Website Design' started by sogastic, Jul 25, 2007.

  1. #1
    Just right now Im coding my clients menu in CSS. My menu items are images and are styled in CSS as background image for <li>. But If I put some text with keywords between li and set one style more to CSS called text-indent: -9999px; So the text is displayed somewhere 9999px away I suppouse. Can google read this text ?

    It was a bit messy explanation. Give me a question if you can't understand.

    Thanks
    Janar
     
    sogastic, Jul 25, 2007 IP
  2. benihana

    benihana Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes. the googlebot doesnt attempt to render your page and then see which bits are visibile, it really just chews through the html
     
    benihana, Jul 25, 2007 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Exactly - most search engines ignore your CSS, so whatever you do for presentation there really doesn't matter.

    Out of curiousity are you inlining the images as img tag, or placing them via CSS? If the latter you may want to consider a layered image replacement technique - the good versions usually involve 'wasting' an extra tag, but at least give the user something to look at with 'images off, CSS on'.

    My personal favorite approach is:

    <a href="#">Home<span></span></a>

    a,
    a span {
    display:block;
    height:24px;
    width:128px;
    }

    a {
    color:#FFF;
    background:#888;
    font:normal 16px/24px arial,helvetica,sans-serif;
    }

    a span {
    position:relative;
    margin-top:-24px;
    background:url(images/button.png) 0 0 no-repeat;
    }

    a:active span,
    a:focus span,
    a:hover span{
    background-position:0 -24px;
    }

    The negative margin slides the span up over the text positioning the background-image atop the text, so you don't have to move the text. You'll also note that you can still use background-position to slide the background-image up for mouse-over effects, just place the two button styles one atop the other. I usually place three image styles one over the other when doing that: normal, rollover and current.

    Best of all, no futzing around with text-indent... though there is the cost of wasting a few bytes on a empty container in the HTML.
     
    deathshadow, Jul 25, 2007 IP
    sogastic likes this.
  4. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #4
    it will read it but it would be considered as spam if it was not viewable on the page.
     
    just-4-teens, Jul 25, 2007 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #5
    WHERE do people get this nonsense into their head?
     
    deathshadow, Jul 25, 2007 IP
  6. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #6
    How would the search engine bot know if it's viewable on a page ? LOL?

    ugh, what deathshadow said ^ :)
     
    soulscratch, Jul 25, 2007 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #7
    No, the search engines won't consider it to be spamming. However, if you use images for your menu via CSS (rather than image elements), make sure that the underlying text is still readable when images are disabled while the stylesheet is still getting parsed.
     
    Dan Schulz, Jul 25, 2007 IP
  8. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #8
    They get them from frauds who think they're God's Gift to SEO and thus wrongly believe they know everything there is to know.
     
    Dan Schulz, Jul 25, 2007 IP