...

View Full Version : Aligning Div tags issue.



Zeke2
11-01-2010, 12:20 AM
So far this is three threads, so sorry to the people whom have helped me. I don't like jumping back with questions at people, but i've hit a new problem with alignment.

Im just not getting the principle of alignment yet, so my questions might be repetitive.

I have four images, http://img524.imageshack.us/img524/8955/layoutnc.jpg and I am unsure how to code this so that they appear in such a way.

Do I wrap all four images in a single div tag, then create a seperate div tag for each image? If that's right, how do I position them so that they fit properly?

I suppose my main question is, are websites entirely structured with div tags? And can someone help me understand the concept of the Float tag? I think I know how to use it but it's relationship to other elements is still eluding me.

Im going to attempt to do this with relative/absolute positioning because I am unsure of any other way of doing this. Any advice would be great. Thanks :)



<html>
<head>
<title>test</title>
<style type="text/css">

div.container {
width:1500px;
margin-left:auto;
margin-right:auto;
position:relative;
background-color:white;
min-height:600px;
}


div.1 {
float:left;
background-image:url('1.jpg');
width:556px;
height:22px;
}


div.2 {
background-image:url('1.jpg');
width:112px;
height:18px;
border:1px solid red;
overflow:auto;
min-height:600px;
}


div.3 {
background-image:url('3.jpg)
}


div.4{
background-image:url('4.jpg');
float:right;
}

</style>

<body>

<div class="container">

<div class="1">
</div>

<div class="3">
</div>
<div class="4">
</div>
<div class="2">
</div>

</div>


</body>
</html>

abduraooft
11-01-2010, 10:15 AM
Take a look at http://bonrouge.com/3c-hf-fixed.php to see how the three columns are aligned using floats.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum