Web Design and Development Forums

[SOLVED] simple layout problem

This is a discussion on "[SOLVED] simple layout problem" within the CSS Forum section. This forum, and the thread "[SOLVED] simple layout problem are both part of the Design Your Website category.


Go Back   Webforumz.com > Design Your Website > CSS Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old May 1st, 2008, 13:00   #1 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
[SOLVED] simple layout problem

I am building a template, and i am stumped with this

please look at attached image 2

that is what i have here

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#header {
    margin: 0 auto;
    width:960px;
    height:200px;
    overflow:auto;
}

#container {
    margin: 0 auto;
    width:960px;
    overflow:auto;

}

#left {
    float: left;
    width:220px;
    height:400px;
    clear:left;
    margin: 15px 8px 3px 0;
}

#centre {
    float: left;
    width:504px;
    height:500px;    
    margin: 0 0 3px 0;
}

#right {
    float: right;
    width:220px;
    height:400px;    
    margin: 15px 0 3px 8px;
}

#footer {
    margin: 0 auto;
    width:960px;
    height:90px;
    margin-top: 10px;
    margin-bottom:5px;

}

#menu { float: left;
        width: 960px;
        height:50px; 
-->
</style>
</head>

<body>
<div id="header">
<div id="menu"></div>
</div>
<div id="container">
<div id="left"></div>
<div id="centre"></div>
<div id="right"></div>

</div>
<div id="footer"></div>
</body>
</html>
what i want is image 1

but i cant seem to get the centre float to overlap the header, if i put in lets say -30px it only underlaps ( hope that makes sence )

anyone know what the trick is ? thank you
Attached Images
File Type: jpg 2.jpg (13.9 KB, 7 views)
File Type: jpg 1.jpg (13.9 KB, 6 views)
__________________
recipebite.co.uk - its a working progress...
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 13:20   #2 (permalink)
Section Manager -
Website Critique
 
welshstew's Avatar
 
Join Date: May 2007
Location: inside the outside
Posts: 1,095
Blog Entries: 10
Re: simple layout problem

try setting a z-index of 10 on it
__________________
WelshStew
Section Manager

tierney rides tboard - uk site : xtreme wales - extreme clothing
welshstew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 13:29   #3 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: simple layout problem

sorry mate i have tried that one, does not work
__________________
recipebite.co.uk - its a working progress...
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 16:18   #4 (permalink)
 
Join Date: Jun 2007
Location: uk
Posts: 459
Re: simple layout problem

Give this a try.

Its absolute positioning , not great i Know.

HTML: Select all
#centre {
    
    width:504px;
    height:500px;
    margin-left:227px;    
   margin-top:118px;
   position:absolute;
     
}
Pat
dab42pat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 17:03   #5 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: simple layout problem

i really wanted to avoid absolutes because the layout is fluid, and it will mess up as soon as anyone has a different size screen as my own comes along - due to margin: 0 auto;
__________________
recipebite.co.uk - its a working progress...
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 17:39   #6 (permalink)
 
Join Date: Jun 2007
Location: uk
Posts: 459
Re: simple layout problem

Yep point taken. Give this a try.

HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#header {
    margin: 0 auto;
    width:960px;
    height:200px;
    overflow:auto;
    border:#000000 thin solid;
    z-index:1;
}

#container {
    margin: 0 auto;
    width:960px;
    overflow:auto;
    

}

#left {
    float: left;
    width:220px;
    height:400px;
    clear:left;
    margin: 15px 8px 3px 0;
    border:#000000 thin solid;
}

#centre {
    float: left;
    width:504px;
    height:500px;    
    margin-top: -50px; 
    border:#000000 thin solid;
    z-index:2;
}

#right {
    float: right;
    width:220px;
    height:400px;    
    margin: 15px 0 3px 8px;
    border:#000000 thin solid;
}

#footer {
    margin: 0 auto;
    width:960px;
    height:90px;
    margin-top: 10px;
    margin-bottom:5px;
    border:#000000 thin solid;

}

#menu { float: left;
        width: 960px;
        height:50px;
        } 
-->
</style>
</head>

<body><div id="container">
<div id="header">
<div id="menu"></div>
</div>

<div id="left"></div>
<div id="centre">grttyujygujkygu</div>
<div id="right"></div>

</div>
<div id="footer"></div>
</body>
</html>
Something like this may solve your problem.

Pat
dab42pat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 17:48   #7 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: simple layout problem

close, but i now have scroll bars all over whenever i try to correct the layout lol, ( right div has dropped )
__________________
recipebite.co.uk - its a working progress...

Last edited by saltedm8; May 1st, 2008 at 17:51.
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 17:59   #8 (permalink)
 
Join Date: Jun 2007
Location: uk
Posts: 459
Re: simple layout problem

Ok round 3

HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#header {
    margin: 0 auto;
    width:965px;
    height:200px;
    
    border:#000000 thin solid;
    z-index:1;
}

#container {
    margin: 0 auto;
    width:970px;
    overflow:hidden;
    

}

#left {
    float: left;
    width:220px;
    height:400px;
    clear:left;
    margin: 15px 8px 3px 0;
    border:#000000 thin solid;
}

#centre {
    float: left;
    width:504px;
    height:500px;    
    margin-top: -85px; 
    border:#000000 thin solid;
    z-index:2;
}

#right {
    float: right;
    width:220px;
    height:400px;    
    margin: 15px 0 3px 8px;
    border:#000000 thin solid;
}

#footer {
    margin: 0 auto;
    width:965px;
    height:90px;
    margin-top: 10px;
    margin-bottom:5px;
    border:#000000 thin solid;

}

#menu { float: left;
        width: 960px;
        height:50px;
        } 
-->
</style>
</head>

<body><div id="container">
<div id="header">
<div id="menu"></div>
</div>

<div id="left"></div>
<div id="centre">grttyujygujkygu</div>
<div id="right"></div>

</div>
<div id="footer"></div>
</body>
</html>
dab42pat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 1st, 2008, 18:04   #9 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: simple layout problem

congrats, looks good to me, thank you, nice one

Oops, spoke too soon, ie issue, right div is dropped
__________________
recipebite.co.uk - its a working progress...

Last edited by saltedm8; May 1st, 2008 at 18:08.
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 2nd, 2008, 07:13   #10 (permalink)
 
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,750
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: simple layout problem

Have you got this hosted anywhere.. hehe! Call me lazy or what?!
__________________
I'm back!!!!
Marc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 2nd, 2008, 07:50   #11 (permalink)
Section Manager -
Website Critique
 
welshstew's Avatar
 
Join Date: May 2007
Location: inside the outside
Posts: 1,095
Blog Entries: 10
Re: simple layout problem

Quote:
Originally Posted by saltedm8 View Post
congrats, looks good to me, thank you, nice one

Oops, spoke too soon, ie issue, right div is dropped
I think that is due to the borders being added
try this:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#header {
    margin: 0 auto;
    width:965px;
    height:200px;
    
    background-color:red;
    z-index:1;
}

#container {
    margin: 0 auto;
    width:970px;
    overflow:hidden;
    

}

#left {
    float: left;
    width:220px;
    height:400px;
    clear:left;
    margin: 15px 8px 3px 0;
    background-color:green;
}

#centre {
    float: left;
    width:504px;
    height:500px;    
    margin-top: -85px; 
    background-color:blue;
    z-index:2;
}

#right {
    float: right;
    width:220px;
    height:400px;    
    margin: 15px 0 3px 8px;
    background-color:black;
}

#footer {
    margin: 0 auto;
    width:965px;
    height:90px;
    margin-top: 10px;
    margin-bottom:5px;
    background-color: yellow;

}

#menu { float: left;
        width: 960px;
        height:50px;
        } 
-->
</style>
</head>

<body><div id="container">
<div id="header">
<div id="menu"></div>
</div>

<div id="left"></div>
<div id="centre">grttyujygujkygu</div>
<div id="right"></div>

</div>
<div id="footer"></div>
</body>
</html>
__________________
WelshStew
Section Manager

tierney rides tboard - uk site : xtreme wales - extreme clothing
welshstew is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 2nd, 2008, 10:40   #12 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: simple layout problem

that did it, thanks mate
__________________
recipebite.co.uk - its a working progress...
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 2nd, 2008, 15:23   #13 (permalink)
 
Join Date: Jun 2007
Location: uk
Posts: 459
Re: [SOLVED] simple layout problem

oops, added the borders to see where things were. Forgot to remove them.
dab42pat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 2nd, 2008, 18:02   #14 (permalink)
Lead Administrator
 
saltedm8's Avatar
 
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,062
Blog Entries: 1
Send a message via MSN to saltedm8
Re: [SOLVED] simple layout problem

lol, sorted now, thanks
__________________
recipebite.co.uk - its a working progress...
saltedm8 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] simple div problem hhelen HTML Forum 5 Apr 4th, 2008 14:56
[SOLVED] Simple Php Code Problem longstand PHP Forum 3 Oct 17th, 2007 21:02
[SOLVED] Accessibility problem with layout Graisbeck CSS Forum 7 Sep 3rd, 2007 11:16
Help needed to slice a site (Simple layout) shorn New to Web Design 1 Apr 23rd, 2007 12:43
Simple 4 Box Layout bluemeany CSS Forum 8 Nov 30th, 2006 13:13



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 19:24.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6