tarleton Posted November 9, 2009 Share Posted November 9, 2009 Hi so I'm super new to CSS. Trying to make a 3 col layout (yes I know there are some on the net already but trying to learn). Got a few problems: 1. Right Column isn't staying near header. 2. Mid column isn't going to full length like left column. 3. There is a white border around entire page. Thanks for any help guys. Here is what i've got so far: www.spacioushost.com/test style.css #header { background: #000; height:55px; width:100%; } #leftcol { position: absolute; width: 15%; height: 100%; background:url(images/left_col.jpg) repeat; } #rightcol { width: 15%; height: 100%; background:url(images/right_col.jpg) repeat; float: right; } #midcol { background: #232323; width: 70%; height: 100%; margin-left: 15%; } Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/ Share on other sites More sharing options...
rajivgonsalves Posted November 9, 2009 Share Posted November 9, 2009 try this out #header { background: #000; height:55px; width:100%; } #content {width:100%;padding:0px} #leftcol { width: 15%; height: 100%; background:url(images/left_col.jpg) repeat; float:left } #rightcol { width: 15%; height: 100%; background:url(images/right_col.jpg) repeat; float:left } #midcol { width: 70%; height: 100%; float:left } Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-953916 Share on other sites More sharing options...
tarleton Posted November 9, 2009 Author Share Posted November 9, 2009 So your amazing Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-953917 Share on other sites More sharing options...
tarleton Posted November 9, 2009 Author Share Posted November 9, 2009 Another Quick Question: 1. When I add text how can I make it so it is contained within the div area? Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-953924 Share on other sites More sharing options...
rajivgonsalves Posted November 9, 2009 Share Posted November 9, 2009 just put it in the respective div tag just like you've done with "<---- Left Col ------>" etc. etc. Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-953934 Share on other sites More sharing options...
Dorky Posted November 9, 2009 Share Posted November 9, 2009 commenting code... nah!!! if it was hard to write, it should be hard to read lmao, that is just awesome. Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-953950 Share on other sites More sharing options...
tarleton Posted November 9, 2009 Author Share Posted November 9, 2009 Hi mate so yeah I did. But it still keeps going outside.... Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-953984 Share on other sites More sharing options...
rajivgonsalves Posted November 9, 2009 Share Posted November 9, 2009 can you post your code it ? and tell what is going out Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-953987 Share on other sites More sharing options...
Dorky Posted November 9, 2009 Share Posted November 9, 2009 body { background-color: #FFF; } #header { background: #000; height:55px; width:100%; } #leftcol { display: inline; float: left; width: 15%; height: 100%; background:url(images/left_col.jpg) repeat; } #rightcol { display: inline; float: left; width: 15%; height: 100%; background:url(images/right_col.jpg) repeat; } #midcol { display: inline; float: left; background: #232323; width: 70%; height: 100%; } just edited what you had in firebug. works great! [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-954192 Share on other sites More sharing options...
Dorky Posted November 9, 2009 Share Posted November 9, 2009 oh and ie may have some auto margins and there is always the body margin. tou can just put * { margin: 0px; } just like that at the top of your css Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-954200 Share on other sites More sharing options...
tarleton Posted November 10, 2009 Author Share Posted November 10, 2009 Ahhhh Phpfreaks if only you were a female Cheers Link to comment https://forums.phpfreaks.com/topic/180815-3-col-div-under-div/#findComment-954486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.