Hi, I had some great help from someone here to get my 3 divs displaying inline a while ago, but I have a follow up question now…
It is all working fine still, but I encountered a problem with movies that have names that are too long: the text extends over the other divs instead of wrapping down.
Here is my code:
<div id="wishlist">
<div id="wishlistmovie">
movie names are echoed here
</div>
<div id="wishlistdate">
movie dates are echoed here
</div>
<div id="wishlistgenre">
genres are echoed here
</div>
<br/>
</div>
That seems unlikely with the code you’ve posted, unless the movie name is one, long, unbroken name, which doesn’t seem to be the case. It might be something else on your page (or in your CSS) making that happen. Can you post a full example page with CSS embedded?
Using the code you posted, the text in the movie name box wraps just fine.
It’s likely to be such a flop at the box office that you can safely ignore it.
Well, it’s a single word, so why would it want to wrap? If you put in a hyphen, it would do so. If your main objective is to stop the word overlapping other parts of the site, you could give the container overflow: hidden; , but that would make part of the word inaccessible. Or you could give the container overflow: scroll, and a scroll bar would appear, letting users scroll to see the end of the word. But again, it’s an odd hypothetical, really, and not something I would worry about much.
Just apply it to the appropriate element and it will break unbroken text in all modern browsers.
Note that if you have some floats going to two lines deep then you will have wrapping issues and the float will snag. You will need to wrap each row of floats in a div and apply clear:both to that parent so that each set of three start on a new line.