Jump to content

CSS Relative Problem


wemustdesign

Recommended Posts

I can't seem to figure out what the problem is here. All I want to do is align 2 divs next to each other. I am using relative positioning as float was causing problems.

 

The 2nd div always aligns with the bottom of the first div. You can see what I mean here:

 

http://www.the-photography-studio.co.uk/test.php

 

Here is my code

 

<div id="main_wm">


<div class="mainleft_rev">
<br />
<br />
<br />
<br />
<br />
<br />
<br />

</div>
<!--end mainleft-->



<div class="mainright_rev">

This is test content
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div><!--main_right_rev-->

</div><!--main_wm-->

 

 

CSS:

#main_wm  {width:100%; background-color:#0066FF; background-image:url(images/bg_left.jpg); background-position:left; background-repeat:repeat-y;}
.mainleft_rev{width:200px; min-height:180px; position:relative; top:0; height:auto !important; height:180px; background-color:#00CC00;}
.mainright_rev{width:400px; min-height:180px; position:relative; top:0; left:200px; height:auto !important; height:180px; clear:both; background-color:#00CC00;}

Link to comment
https://forums.phpfreaks.com/topic/169919-css-relative-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.