[SOLVED] simple layout problem

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



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 1st, 2008, 13:00
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,505
Blog Entries: 1
Thanks: 1
Thanked 11 Times in 11 Posts
[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, 9 views)
File Type: jpg 1.jpg (13.9 KB, 8 views)
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote

  #2 (permalink)  
Old May 1st, 2008, 13:20
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,485
Blog Entries: 13
Thanks: 1
Thanked 20 Times in 18 Posts
Re: simple layout problem

try setting a z-index of 10 on it
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #3 (permalink)  
Old May 1st, 2008, 13:29
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,505
Blog Entries: 1
Thanks: 1
Thanked 11 Times in 11 Posts
Re: simple layout problem

sorry mate i have tried that one, does not work
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
  #4 (permalink)  
Old May 1st, 2008, 16:18
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #5 (permalink)  
Old May 1st, 2008, 17:03
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,505
Blog Entries: 1
Thanks: 1
Thanked 11 Times in 11 Posts
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;
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
  #6 (permalink)  
Old May 1st, 2008, 17:39
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #7 (permalink)  
Old May 1st, 2008, 17:48
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,505
Blog Entries: 1
Thanks: 1
Thanked 11 Times in 11 Posts
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 )
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)

Last edited by saltedm8; May 1st, 2008 at 17:51.
Reply With Quote
  #8 (permalink)  
Old May 1st, 2008, 17:59
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
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>
Reply With Quote
  #9 (permalink)  
Old May 1st, 2008, 18:04
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,505
Blog Entries: 1
Thanks: 1
Thanked 11 Times in 11 Posts
Re: simple layout problem

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

Oops, spoke too soon, ie issue, right div is dropped
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)

Last edited by saltedm8; May 1st, 2008 at 18:08.
Reply With Quote
  #10 (permalink)  
Old May 2nd, 2008, 07:13
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,662
Thanks: 0
Thanked 9 Times in 9 Posts
Re: simple layout problem

Have you got this hosted anywhere.. hehe! Call me lazy or what?!
Reply With Quote
  #11 (permalink)  
Old May 2nd, 2008, 07:50
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,485
Blog Entries: 13
Thanks: 1
Thanked 20 Times in 18 Posts
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
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
Reply With Quote
  #12 (permalink)  
Old May 2nd, 2008, 10:40
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,505
Blog Entries: 1
Thanks: 1
Thanked 11 Times in 11 Posts
Re: simple layout problem

that did it, thanks mate
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
  #13 (permalink)  
Old May 2nd, 2008, 15:23
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: [SOLVED] simple layout problem

oops, added the borders to see where things were. Forgot to remove them.
Reply With Quote
  #14 (permalink)  
Old May 2nd, 2008, 18:02
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,505
Blog Entries: 1
Thanks: 1
Thanked 11 Times in 11 Posts
Re: [SOLVED] simple layout problem

lol, sorted now, thanks
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
Reply

Thread Tools

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 Web Page Design 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 Web Page Design 7 Sep 3rd, 2007 11:16
Help needed to slice a site (Simple layout) shorn Starting Out 1 Apr 23rd, 2007 12:43
Simple 4 Box Layout bluemeany Web Page Design 8 Nov 30th, 2006 13:13


All times are GMT. The time now is 00:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43