CSS positioning problems
Posted: 11 August 2009 04:49 PM   [ Ignore ]
Newbie
Rank
Total Posts:  3
Joined  2009-08-11

I am creating website using CSS. It must be something like this:
http://webdesign-gold.awardspace.biz/model_1.html
A picture of a header(fuchsia) is made from many small fragments. The same with a navigation bar(green). To perform this task i used absolute positioning for these fragments. So, actually i need everything in this website to be positioned absolutely. But i can’t. Everything is moving instead of the picture. Something obviously wrong with the positioning:
http://webdesign-gold.awardspace.biz/learning/example1/index1.html
I uploaded only a few fragments of a pictures, hope it doesn’t create problems for understanding. Could you help me to understand what is wrong?
[B]HTML:[/B]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html>
 <
head>
  <
title>Webmaster2008_first example</title>
<
meta http-equiv="Content-Type" content="text/html; charset=ANSI" />
<
link rel="stylesheet" href="styles.css" type="text/css" />
 </
head>

 <
body>

<
div id="container">
<
div id="header">

 <!-- 
Definition of a cod for building the top part of the header -->

<
div id="index_01">
<
img src="images/index_01.jpg"/>
</
div>
<
div id="index_02">
<
img src="images/index_02.jpg"/>
</
div>
<
div id="index_03">
<
img src="images/index_03.jpg"/>
</
div>
<
div id="index_04">
<
img src="images/index_04.jpg"/>
</
div>
<
div id="index_05">
<
img src="images/index_05.jpg"/>
</
div>
<
div id="index_06">
<
img src="images/index_06.jpg"/>
</
div>
<
div id="index_07">
<
img src="images/index_07.jpg"/>
</
div>
<!-- 
End of a cod for building the top part of the header -->

<!-- 
Definition of cod for building the middle part of the header -->

<
div id="index_08">
<
img src="images/index_08.jpg"/>
</
div>
<
div id="index_09">
<
img src="images/index_09.jpg"/>
</
div>
<
div id="index_10">
<
img src="images/index_10.jpg"/>
</
div>
<
div id="index_11">
<
img src="images/index_11.jpg"/>
</
div>
<
div id="index_12">
<
img src="images/index_12.jpg"/>
</
div>
<
div id="index_13">
<
img src="images/index_13.jpg"/>
</
div>
<
div id="index_14">
<
img src="images/index_14.jpg"/>
</
div>
<
div id="index_15">
<
img src="images/index_15.jpg"/>
</
div>
<
div id="index_16">
<
img src="images/index_16.jpg"/>
</
div>
<
div id="index_17">
<
img src="images/index_17.jpg"/>
</
div>
<
div id="index_18">
<
img src="images/index_18.jpg"/>
</
div>
<
div id="index_19">
<
img src="images/index_19.jpg"/>
</
div>
<!-- 
The picture of the header is created -->

<!-- 
blue stripe -->
<
div id="index_21">
<
img src="images/index_21.jpg" width="770" height="10" />
</
div>
<!-- 
end of blue stripe -->

</
div> <!-- end #header -->

<!-- Hotel search and Special offer -->

<
div id="index_23">
<
img src="images/index_23.jpg" width="616" height="95" />
</
div>
<
div id="index_27">
<
img src="images/index_27.jpg" width="245" height="27" />
</
div>
<
div id="index_24">
<
img src="images/index_24.jpg"/>
</
div>
<
div id="index_25">
<
img src="images/index_25.jpg"/>
</
div>
<
div id="index_26">
<
img src="images/index_26.jpg"/>

</
div>
<
div id="index_28">
<
img src="images/index_28.jpg"/>
</
div>
<
div id="index_29">
<
img src="images/index_29.jpg"/>
</
div>

<
div id="content">
    <
div id="content_left">
    <
img src="images/index_31.jpg" alt="airplane" />

    <
div class="box">
    <
img src="images/index_34.jpg" align="middle">
    <
class="left_box"> <b>fonte lactis ubertim manante:</batque aundante opis egentissimum et illoa dhuc uno 
    alimento vitam ucentemon sortem non pati
sed blante tole ran tur haecnon quia .
    <
br />
    <
span class="readmore"><a href="#" target="_blank">read more>></a></span> </p>
    </
div>

<
p> &nbsp; </p>

    <
div class="box">
    <
img src="images/index_34.jpg" align="middle">
    <
class="left_box"> <b>fonte lactis ubertim manante:</batque aundante opis egentissimum et illoa dhuc uno 
    alimento vitam ucentemon sortem non pati
sed blante tole ran tur haecnon quia 
    
.<br />
    <
span class="readmore"><a href="#" target="_blank">read more>></a></span> </p>
    </
div>

<
p> &nbsp; </p>

    <
div class="box">
    <
img src="images/index_34.jpg" align="middle">
    <
class="left_box"> <b>fonte lactis ubertim manante:</batque aundante opis egentissimum et illoa dhuc uno 
    alimento vitam ucentemon sortem non pati
sed blante tole ran tur haecnon quia 
    
.<br />
    <
span class="readmore"><a href="#" target="_blank">read more>></a></span> </p>
    </
div>
    

    </
div> <!-- end #content_left -->
<div id="content_right">

</
div> <!-- end #content_right -->

<br class="clearfloat" />
</
div> <!-- end #content -->

<div id="menu_bottom">
</
div> <!-- end #menu_bottom -->

<div id="footer">
</
div> <!-- end #footer -->
</div> <!-- end #container -->
 
 
</body>
</
html
Profile
 
 
Posted: 11 August 2009 04:51 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  3
Joined  2009-08-11

CSS:

body{
margin
0;
padding0;
background-image:url('images/main_bg.jpg');
background-repeat:repeat;
}

a
:linka:visited { colorbluetext-decorationnonefont-weightbold;
a
:activea:hover { colorbluetext-decorationunderline;}

#container {
width770px;
margin0 auto;
padding0;
border-left0px 
border
-right0px 
background
-colorAliceBlue;
text-alignleft;
}

#header {
background-colorfuchsia;
}

/* pictures of a header. The pictures from the middle starts with high of 100 => 100-29=71*/

#index_01 {
positionabsolute
left200px
top0 px;
}
#index_02 {
positionabsolute
left323px
top0 px;
}
#index_03 {
positionabsolute
left402px
top0 px;
}
#index_04 {
positionabsolute
left509px
top0 px;
}
#index_05 {
positionabsolute
left616px
top0 px;
}
#index_06 {
positionabsolute
left728px
top0 px;
}
#index_07 {
positionabsolute
left847px
top0 px;
}
#index_08 {
positionabsolute;
left200px
top29px;
}
#index_09 {
positionabsolute;
left261px
top29px;
}
#index_10 {
positionabsolute;
left323px
top29px;
}
#index_11 {
positionabsolute;
left389px
top29px;
}
#index_12 {
positionabsolute;
left524px
top29px;
}
#index_13 {
positionabsolute;
left823px
top29px;
}
#index_14 {
positionabsolute;
left893px
top29px;
}
#index_15 {
positionabsolute;
left524px
top58px;
}
#index_16 {
positionabsolute;
left524px
top133px;
}
#index_17 {
positionabsolute;
left752px
top133px;
}
#index_18 {
positionabsolute;
left752px
top185px;
}
#index_19 {
positionabsolute;
left752px
top204px;
}
/* end of pictures of a header */
/* blue stripe */
#index_21 {
positionabsolute;
left200px
top220px;
}


/* Hotel search and Special offer */

#index_23 {
positionabsolute;
left200px
top235px;
}
#index_24 {
positionabsolute;
left616px
top235px;
}
#index_25 {
positionabsolute;
left690px
top235px;
}
#index_26 {
positionabsolute;
left845px
top235px;
}
#index_27 {
positionabsolute;
left200px
top330px;
}

#index_28 {
positionabsolute;
left445px
top330px;
}
#index_29 {
positionabsolute;
left544px
top330px;
}

/* End of Hotel search and Special offer */

#index_31 {
positionabsolute;
left200px
top357px;
}

/* content */

#content {
width770px;
padding0px;
top:357px
background
-colorGainsboro/* gray */
}

/* content_left */

#content #content_left {
floatleft;
margin-top357px;
width256px;
background-coloraqua;
positionabsolute;
}

#content_left img {
margin-left0px;
margin-top0px;
padding0px;
}

#content_left .box {
floatleft;
width256px;
}

.box  img {
float
left;
margin-right0px;
}

.box p.left_box {
font
-familyverdana;
font-size10px;
colorblue;
margin-left18px;
margin-right21px;
}

.box p.left_box b:first-child
{
font
-weight:bold
}

.box .readmore {
font
-familyverdana;
font-size10px;
colorblue;
padding-top:0px;
padding-left:131px;
}

#content #content_right {
floatright;
width12em;
}

#footer p {
margin0;
padding10px 0;
background-color#DDDDDD;
text-aligncenter;
font-size.8em;
}
.clearfloat {
clear
both;
height0;
font-size1px;
Profile