![]() |
|
|
Div split into 3 parts...? |
|
Wannabe Adventurer...
Posts: 477
Name: Darren
Location: England
|
I'm trying to buid a site without using any tables and am really struggling!
Here is what I am trying to do demonstrated with tables Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3%" background="images/bg1.jpg"> </td>
<td width="95%" background="images/bg1.jpg"><div align="center"><img src="images/header.jpg" width="950" height="160" /></div></td>
<td width="2%" background="images/bg1.jpg"> </td>
</tr>
</table>
A header image is in the middle one and there are 2 "border images" either side so the header then stays central but the sides "stetch" the whole page no matter what screen res.... How is this achieved using CSS? Ta ![]()
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..." QuizBay Help with the testing of this Beta site! |
|
|
|
| Sponsored Links (We share ad revenue): |
|
|
Re: Div split into 3 parts...? |
|
Super Moderator
![]() Posts: 5,557
Location: Tennessee
|
3-column layout - make the outer 2 liquid using percentages and float them left and right. Set the center column as a fixed width, and float it too. Using floats will keep them all next to each other. Just avoid putting margins and padding on the floated boxes themselves as this will trigger some ugly IE bugs. If you must use margins, then you'll need conditional comments and a separate file to hold the css to kill the IE bugs.
http://css-discuss.incutio.com/?page=ThreeColumnLayouts www.positioniseverything.net
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !! "Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday" |
|
|
|
|
|
Re: Div split into 3 parts...? |
|
Wannabe Adventurer...
Posts: 477
Name: Darren
Location: England
|
Thanks for the help.
All this just to make a footer with a central bg image and some links over the top..? I still just dont get the advantage of using css instead of tables... Maybe I'll have one of those "Eureka" moments where it all make sense...
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..." QuizBay Help with the testing of this Beta site! |
|
|
|
|
|
Re: Div split into 3 parts...? | |
|
Super Moderator
![]() Posts: 5,557
Location: Tennessee
|
Quote:
There are LOTS of reason why css is better than tables, but you can start here: http://www.hotdesign.com/seybold/everything.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !! "Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday" |
|
|
|
|
|
|
Re: Div split into 3 parts...? |
|
Wannabe Adventurer...
Posts: 477
Name: Darren
Location: England
|
Sorry,
the code was from this page that i was trying to incorporate in a CSS layout page.a 3 column layout I can handle - but couldnt replicate the above exactly... I made the test page using tables first - now trying to do it using CSS * Man i've got so much to learn... *
__________________
"I always wanted the adoration of John Lennon - With The Anonimity of Ringo Starr..." QuizBay Help with the testing of this Beta site! Last edited by rolda hayes : 03-25-2008 at 05:31 PM. |
|
|
|
| Sponsored Links (We share ad revenue): |
| Thread Tools | |
|
|
| Webmaster Resources Marketplace: |
| Software Development Company | Webhosting.UK.com |
| Web Templates | Text Link Brokers | Stock Photos |