Numpty CSS question
Jan. 24th, 2011 09:44 pmApologies for any stupidity of question... me and CSS still don't get on.
I have defined myself two nice <div>elephants elements, each of which will take up about half the screen.
Now I just need to persuade my stylesheet to help me put them next to each other rather than one below the other.
The ideal answer will not involve tables :) Does anyone know what I should be looking at doing?
I have defined myself two nice <div>
Now I just need to persuade my stylesheet to help me put them next to each other rather than one below the other.
The ideal answer will not involve tables :) Does anyone know what I should be looking at doing?
no subject
Date: 2011-01-24 10:18 pm (UTC)Short answer: use float.
Long answer: if you want to do something more cunning (having both columns the same height regardless of their content, for example), you could do worse than look at these CSS layout templates.
no subject
Date: 2011-01-24 10:23 pm (UTC)Thanks very much - it seems to be Just Working surprisingly nicely!
no subject
Date: 2011-01-24 11:36 pm (UTC)no subject
Date: 2011-01-24 11:53 pm (UTC)It initially did not (I had totally forgotten to check until you reminded me, thank you) but that turned out to be valid behaviour on IE's part. FF was being a lot more tolerant of a missing > and doing what I meant; IE did what I said (unusually).