- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I can’t figure this out..
I have a simple text and I want to make it centered inside a div with a maximum width (200px). I have display:block and width:200px .
The text is appearing centered until it reaches the 200px and then it continues in the same line, there’s no break.
Any idea what I’m doing wrong?
Why don’t you create a jsfiddle of the problem?
I would but jsfiddle gives me the correct result:
http://jsfiddle.net/L6TrY/
LMAO… I have no idea why, but this is making me laugh hysterically
I would but jsfiddle gives me the correct result:
Well It’s true. This is something that should be easy to implement. For some reason this isn’t working, so maybe someone could have a clue why I’m seeing a different behavior.
I don’t know what’s funny about that.
Ok, I know what’s the problem with my jsfiddle example.
This is the problem:
http://jsfiddle.net/L6TrY/5/
If I have a unique bigger word it continues after the 200px width.
Solved. overflow: hidden;