The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Not obeying my width: command
My text isn’t obeying my width command. I have the width at 150 pixels and it does nothing.
#leftcolumn { margin-right: 50px; font-size:12px; color:#ffffff; width:150px; padding-left:480px; padding-right:0px; font-family:’arial’; display: inline;} #middlecolumn { margin-right: 50px; color:#ffffff; font-size:12px; width:150px; font-family:’arial’; display: inline} #lastcolumn { margin-right: 50px; color:#ffffff; font-size:12px; width:150px; font-family:’arial’; display: inline}
I think so you should try to set the width to the div element containing the text and not the text directly.
this fixed it.. display: inline-block;
Any elements that have display inline cannot have height or width. Vertical margin and padding will also be ignored.