relative positioned layer problem

This is a discussion on "relative positioned layer problem" within the Web Page Design section. This forum, and the thread "relative positioned layer problem are both part of the Design Your Website category.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 1st, 2006, 14:47
Junior Member
Join Date: Feb 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
relative positioned layer problem

The site is http://www.evocreative.com/easternbabes/
I have set the layer #nav to relative positioning and placed mark up <div id="nav"></div> right after the main content div. I wanted it to render relative to the top left corner of this div. I can't understand why it is rendering above it. Anyone know what I am doing wrong? Obviously I am not understanding something pretty basic.

CSS:
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}

#wrapper {
font-family: Arial, Helvetica, sans-serif;
width: 800px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}
#content {
font-family: Arial, Helvetica, sans-serif;
margin: 0px;
padding: 0px;
height: auto;
width: 800px;
}
#top {
margin: 0px;
height: 265px;
width: 100%;
}
#top #header {
height: 64px;
border-top-color: #D30D0F;
border-bottom-color: #D30D0F;
border-top-style: solid;
border-bottom-style: solid;
border-bottom-width: 2px;
border-top-width: 2px;
background-image: url(images/logo.jpg);
}
#tagline {
background-color: #D30D0F;
float: left;
height: 36px;
width: 600px;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #FFFFFF;
padding-left: 200px;
}
#bottom {
margin: 0px;
padding: 0px;
float: left;
height: auto;
width: 100%;
}
#bottom #left {
float: left;
height: auto;
width: 183px;
padding-left: 11px;
}
#bottom #right {
width: 606px;
margin-left: 194px;
}
#right #topbabes {
float: left;
height: 260px;
width: 95%;
padding-top: 11px;
padding-left: 25px;
}
.bigbabes {
float: left;
height: auto;
width: auto;
margin-right: 45px;
}
.bigbabename {
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-weight: bold;
color: #8A8C8D;
text-align: center;
padding-top: 5px;
}
.bigbabesright {

float: left;
height: auto;
width: auto;
margin-right: 0px;
}
#homethumbs {
background-color: #F2F2F2;
float: left;
height: 235px;
width: 575px;
padding-left: 25px;
}
.homethumb img {
border: 1px solid #CE0C0C;
}
#homethumbs .homethumb {
float: left;
width: 50px;
margin-right: 33px;
margin-top: 10px;
}
.thumbtext {
font-family: Arial, Helvetica, sans-serif;
font-size: 8pt;
font-weight: bold;
color: #666666;
text-align: center;`
padding-top: 5px;
line-height: 9pt;
}
#homethumbs .homethumblast {
float: left;
width: 50px;
margin-top: 10px;
}
#signup {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #D30D0F;
background-color: #E3E3E3;
height: 170px;
width: 167px;
}
#nav {
left:5px;
width:178px;
height:335px;
z-index:1;
background-image: url(images/nav_back.png);
background-repeat: no-repeat;
position: relative;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 1st, 2006, 17:09
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: relative positioned layer problem

Look at this snipett of code from your page:
Code: Select all
<div id="wrapper">
<div id="content">
<div id="nav"></div>
<div id="top">
<div id="header"><img src="
Your 'nav' div is inside a 'content' div which is inside a 'wrapper' div.

Notice that you have opened and closed your 'nav' div so it is the first complete item on the page that is rendered which is why it's at top left before anything else.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 2nd, 2006, 06:25
Junior Member
Join Date: Feb 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Re: relative positioned layer problem

So I should close the nav div at the end of the page or put it somewhere else? If so then where?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 2nd, 2006, 11:12
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: relative positioned layer problem

Overall layout is up to you but...

Wrapper goes around everything else.

I would think you need to open and close your header then.

Now comes your nav, probably floated left rather than using absolute positioning.

Now the content should tak up space to the right of the nav div.

Foter if you have one should be the last main div to open and close inside the wrapper.
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

Tags
relative, positioned, layer, problem

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
CSS Relative <DIV> Size Problem andycain Web Page Design 6 Nov 29th, 2007 14:32
Anchors in layer problem rlwillis JavaScript Forum 1 Aug 20th, 2007 19:21
relative Positioning Problem Dunce Web Page Design 6 Jun 8th, 2007 10:54
relative position problem antonyx Web Page Design 12 Dec 30th, 2005 21:19
Problem with a floating layer. derdeb Web Page Design 7 Jul 8th, 2005 18:22


All times are GMT. The time now is 23:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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