I'm trying to replace my table-based design with CSS positioning but things are not going well.  
In my masthead I want to use absolute positioning to position different images and menu options ABSOLUTELY within the MASTHEAD rather than within the BODY. At the moment everything is positioned ABSOLUTELY within the BODY!!
I've tried setting a div container which is relatively positioned (div id="mastheadsection") to act as a parent for all the images, but they still end up being positioned absolutely for the body rather than the masthead.
My code is:
Quote:
<div id="masthead">
<div id="mastheadsection">
<img class="imglogo" alt="" src="logo.gif" width="87" height="47" />
<img class="imgattractive"alt="" src="attractive.gif" width="598" height="36" />
<img class="imgseo"alt="" src="seo.gif" width="253" height="27" />
</div>
</div>
|
My CSS code is:
Quote:
.mastheadsection {
position:relative;
width: 950px;
height: 500px;
top:0px;
left:0px;
}
.imglogo {
position:absolute;
top:0px;
left:0px;
}
.imgattractive {
position:absolute;
top:100px;
left:110px;
}
.imgseo {
position:absolute;
top:130px;
left:200px;
}
|
Would be really grateful for any tips - I've read quite a bt but can't see where I'm going wrong.
Last edited by jj1; 07-27-2009 at 05:50 AM..
|