PDA

View Full Version : relative positions


dozd
08-25-2009, 02:46 PM
Hi, maybe the question is little strange so pls. for understanding. I have two divs with relative positions. If I want two divs be on same line at the top the second div has negative value on top property. Logically if I increase length of first div the second is going down.
The question is: Is some way to use divs with "fix(?!) relative" positions ? If I increase first the second to stay in previous position. I do not need divs with absolute positions.

CSS code:
#first
{
position:relative;
width:400px;
height:50px;

}
#second
{
position:relative;
width:200px;
height:50px;
left:700px;

top:-100px;
}

Thanks

domedia
08-25-2009, 03:39 PM
The description is quite unclear..
Do you simply want a div next to the other?

dozd
08-25-2009, 04:08 PM
Yes, paralel one by one. Second simply next by first. But if first div we extend (change their height) the position of second to be the same .

domedia
08-26-2009, 06:22 PM
ok, in that case just float the first div to the left, and only use the width property on both of them.

dozd
08-27-2009, 08:52 AM
ok, but another problem appears. in dreamweaver both divs are ok, but in browser I can see only the second div.

domedia
08-27-2009, 02:58 PM
Then something is wrong :)
Care to share?