I have a <div> that hold different information coming from the database. One is a horizontal list with dates. It works great until there are to many dates in the list. When that is the case the list just extends outside of the parent <div>. Is there a way to avoid that?
You’ll need to show CSS how you are making the div contain the horizontal list items and how you are making the list items horizontal. And where do they pop out of the div? From the side? the bottom?
Is your database running the dates together without whitespace? If so that could be the problem as it would basically be treating the dates as one word. But then FF should show the problem too.
If you can’t post a link to the page for some reason then post the generated html of the problem area.
If it is acting like one word then you could use the word-break property.
The reason it’s different per browser is, Firefox for example will break a line where it sees a / but for example Opera won’t (we see this with long URLs all the time).
I would use Ray’s word-wrap: break-word and then check which browsers that doesn’t work in (if you have enough users with browsers where that doesn’t work, you could stoop to using Javascript to look for the / and add a ’ ’ in there).
Or, get your back-end to do that when it grabs from the database. Spaces after the commas would make the dates more readable anyway, and all browsers can wrap on a space.