Previous Message
Next Message

Width of Content Bloc

Sent by Jay Blanchard on 22 March 2006 16:04

I would like to have a navigation bar at the left side
of the browser window. The width of the navigation bar
should be 200 Pixel. The content block should consume
the rest of the width of the browser window - not more
and not less. When the browser window is larger the
content block should be larger. When the browser
window is resized smaller the content block should
become smaller. However the navigation bar at the left
of the screen should always be 200 pixel - no matter
of the size of the browser window. Is it possible to
do this using CSS and div?

There are so many tutorials about two-column layout on the web that you
will probably find a suitable one easily. Here is a basic idea....

div.leftContent {
	float: left;
	padding-left: 5px;
#content div.rightContent{
	margin: 0px 50px 0px 205px;	

The left padding in leftContent leaves a margin on the left so that
words aren't crammed against the edge.

The margins in the rightContent leave whitespace on the right (50px),
makes things easier to read. The 205px on the left leaves a 5px gutter
between the left side and right side.
css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Possibly related: