treehouse : what would you like to learn today?
Web Design Web Development iOS Development

text-indent changes width?

  • i was using text-indent and i discovered that it changes the size of the div if the div is positioned absolute with no set width.
    i can't show exactly what i mean because I'm still in testing and the site isn't up yet.

    has anyone ever had this before and is the only way out to give it a set width?
  • Yea, the width pretty much depends on the content (just like floats), so a text-indent would add to the width: http://jsfiddle.net/senff/GaRam/

    Giving it a set width is indeed the way to go, I'd say!