jquery - Keep H1 On Single Line -
i have several divs
<div class="left"> <h1>title</h1> <p>content</p> </div> ... <div class="left"> <h1>title</h1> <p>content</p> </div>
some of titles long. css behind class is
.left { width: 32%; float: left; margin: 5px; }
the issue if user resizes browser, long titles, pushed content down if had 2 or more divs side side 1 having short title , 1 having long title, wouldn't line up
is there way around either resizing h1 tag or else containers
thanks,
jj
try changing css this...
.left { width: 32%; float: left; margin: 5px; white-space: nowrap; }
the nowrap
property should stop text wrapping onto next line, regardless of if can fit or not.
Comments
Post a Comment