teyla: Cartoon Ten typing on top of the TARDIS like Snoopy. (css rocks)
teyla ([personal profile] teyla) wrote2007-10-28 11:38 pm
Entry tags:

I WIN!!

I know I'm probably annoying everybody by posting about layouting all the time, but I JUST MANAGED TO MAKE THREE DIVS SHOW UP IN A ROW WITHOUT HAVING THEM CHANGING THEIR POSITION WHEN ONE OF THEM IS EXTENDED IN HEIGHT!!!!!

Is there an easy way to do this? I had to do a lot of trial and error before I figured out that if I

- float the topmost-supposed-to-be-rightmost div to the right
- give the central div a margin-left
- set the container of the three divs to position: relative
- set the bottom-supposed-to-be-leftmost div to position: absolute

I can move the leftmost div around relative to the container and it won't change its position when the central div changes its height.

It took me way too long to figure this out. Maybe I should read a book about css at some point, after all.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting