|
Posted by Andy Dingley on 09/25/07 09:13
On 24 Sep, 23:05, ben_camero...@hotmail.com wrote:
> How do I get two div sections to sit next to each other horizontally?
Use the CSS property "float"
This is harder to use correctly and well than you might imagine. In
particular, "floating" is easy, but tidying things up afterwards can
be surprising. It's not hard, but you do need to learn some background
first. The tutorial at http://brainjar.com/css/positioning/ is good,
accurate and readable.
Design your pages with a good and accurate browser such as Firefox
first, because IE has many bugs in this area. You can make IE-
compatible and cross-browser pages easily enough, but start from the
"correct" case and make it work for IE. Hacking it up to look right
for IE first, and then trying to fix it, is harder.
Don't believe anything you read on w3schools - much is wrong, bad
practice, obsolete, or at best poorly written.
Don't use absolue positioning. Avoid pixel dimensions. Either of these
make for pages that are inflexible and non-fluid. You might use either
technique at times, but beginners especially should avoid them as
being the technique of first choice.
Navigation:
[Reply to this message]
|