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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.