2 replies [Last post]
Jayson Joseph
Offline
newbie
Last seen: 19 years 36 weeks ago
Joined: 2003-07-15
Posts: 1
Points: 0

I'm a css newbie here and was wondering how do you set the nowrap attribute for a div in css?

paCkeTroUTer
paCkeTroUTer's picture
Offline
Enthusiast
Melbourne, Australia
Last seen: 9 years 45 weeks ago
Melbourne, Australia
Timezone: GMT+10
Joined: 2003-06-27
Posts: 241
Points: 2

DIV and 'nowrap' attribute

Try this:

<style type="text/css" rel="stylesheet">
<!--
.nowrap {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #666666;
	white-space: nowrap;
}
-->	
</style>

and in the DIV use:
<div class="nowrap">Content here</div>

http//melbourne.ug.php.net

dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 7 years 8 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

DIV and 'nowrap' attribute

The first bit of code should be inserted into the HTML file like so:

<html>
<head>
...
<style>
-- as above --
</style>
...
</head>
<body>
...
</body>
</html>

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.