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

[SOLVED]a question(css)

  • i always got struck in one part in css
    suppose i have a div for which i have specified width...as a width is specifeid so any text should not overshoot that specified width..no matter how long it get..but whenever i type a long text which is over the size of div it overshoot the div.......i want that it should come in next line in the same div without overshooting.and i dont wnt to use overflow:auto or scroll..how to achieve this..if u explain with example it will b great
  • The text should wrap automatically. (Unless you have no spaces at all in your text) Can you provide a sample of the code you're using - including html doctype, or better still, a live page to look at.
  • yes box i was testing out with text having no space..after i tested with text having spaces in it ..it is fine..but how to deal with text having no space (i dont think there exist a valid word having no space in it which is so long for my div )...but if there is any or someone make out of his own while submitting a comment how to deal with that then...
  • If no single word exists that is longer than your box you are fine. If you are really worried about people typing in a zillion characters without spacing into that area and having it ruin the design, then bust out overflow: hidden; to prevent it.
  • ok chris and box..thanks for helping out