CSS: two box scenario

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

CSS: two box scenario

Post by nigma »

Hey, I am trying to get two boxes, one box for left side content, one for right side content. I am currently doing it this way:

Code: Select all

#mainWrap
	{
	color: #000;
	margin: 30px 10px;
	}

#rightSide
	{
	background: #ddd;
	color: #000;
	margin: 0 20px 0 0;
	width: 200px;
	}

#leftSide	{
	margin: 0;
	padding: 0 0 0 10px;
	width: 500px;
	float: left;
	}
Used like this:

Code: Select all

<div id="mainWrap">
<div id="leftSide">
<!-- Stuff here -->
</div>
<div id="rightSide">
<!-- Stuff here -->
</div>
</div>
That looks fine except for when I resize the browser window to be real small(which pushes rightSide down below leftSide), now I know things will never be perfect but is there a way I can use CSS to make it so that at minimum both rightSide and leftSide will be visible even if the browser window is sized quite small?

Thanks for any help / advice provided.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Couldn't remake your page (using Mozilla) to get it right, but do you mean something like this?
http://www.projectseven.com/tutorials/css_t/example.htm
(Using: http://www.projectseven.com/tutorials/c ... styles.css )
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

Thanks a bunch, that is exactly what I mean, I will examine the CSS.

Thanks.
Post Reply