SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Center aligning columns
-
Nov 14, 2002, 13:44 #1
Center aligning columns
This is my first time using CSS to make a table-less page. I used absolute positioning to get my two columns the width apart that I like and to place them on the page. However, now I want them to move as a unit, the same width apart, but being more flexible as the browser window changes size so that they're always in the center of the window.
Right now, I have this as my code for the two columns, which are placed within a main <div> saying the width and background color of the main area:
#content {
position:absolute;
top:320px;
left:25px;
margin-bottom: 80px;
background: #FFFFCC;
width:450px;
border: 2pt dotted #FFFFFF; margin:0px 0px 0px 0px; padding:10px;
font: 8pt verdana, arial, helvetica, sans-serif; font-weight: normal;
}
#sidebar {
position:absolute; top:320px; left:500px; width:200px; padding:5px; background: #FFFFCC; border: 2pt dotted #FFFFFF; margin:0px 0px 0px 0px; padding:10px;
font: 8pt verdana, arial, helvetica, sans-serif; font-weight: normal;
}
Thanks for any help!
-MidoriNature's Sunshine herbs and supplements
-
Nov 30, 2002, 08:48 #2
- Join Date
- Apr 2001
- Location
- San Francisco
- Posts
- 3,288
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm sorry, I'm not exactly sure, but one of the following sites could definitely help you. They're all sites that contain CSS layouts and the code to achieve those layouts. Perhaps you could find your solution by examining some of that code.
http://www.bluerobot.com/web/layouts/
http://www.thenoodleincident.com/tut...son/boxes.html
http://www.glish.com/css/#techniques
I hope those help!SPF Mentor/Advisor 2001-2003
SPF Designer of the Year 2002
SPF Graphic Designer of the Year 2003
AdamPolselli.com
-
Dec 7, 2002, 16:22 #3
Thanks so much for the links! It looks exactly like what I need.
Take care,
MidoriNature's Sunshine herbs and supplements
Bookmarks