Nadya Posted October 25, 2006 Share Posted October 25, 2006 in my css file i have the followingbody {background-image: url(sand.jpg) }h1 {font-size: 20pt; text-align: center; }h2,h3,h4 {font-size: 15pt; text-align: left; text-decoration: underline; }.preElement{ white-space:pre; font-weight:bold; color:navy; font-family:arial;}the problem is that white-space:pre DOES NOT work? Anybody has an idea? Link to comment Share on other sites More sharing options...
boen_robot Posted October 25, 2006 Share Posted October 25, 2006 It does, but it really depends on the content itself. white-space: pre makes it so that the result of <div class="preElement">Some contenton more then one line</div> Is rendered in the same way as <pre>Some contenton more then one line</pre> Would be.Apply that class to a non <pre> element that has a text that is on more then one line and you'll see what's the difference with and without it. Link to comment Share on other sites More sharing options...
Nadya Posted October 25, 2006 Author Share Posted October 25, 2006 The Result of <div class="preElement">Some co ntenton more then one line</div> It does, but it really depends on the content itself. white-space: pre makes it so that the result of<div class="preElement">Some contenton more then one line</div> Is rendered in the same way as <pre>Some contenton more then one line</pre> Would be.Apply that class to a non <pre> element that has a text that is on more then one line and you'll see what's the difference with and without it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now