Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dingdongbubble

macrumors 6502a
Original poster
Jun 1, 2007
538
0
I it possible to fix the dimensions and position of the different elements of a page so that no matter which browser accesses them at whatever windows size, the design does not mess up. My guess is that I put <div> tag around the whole body?
 
Short answer: No. IE's margins are different from Mozilla's, which I believe are different from Safari's, so even when you go through and make everything pixel perfect, it's not pixel perfect on a different browser:mad:

long ansewer: yes, of course, anything is possible:D
You may need different style sheets to get it pixel perfect (one for each major browser), but if you're just going for a general (within a few pixels) layout, it's not hard. You'll want to check out the use of the CSS attributes position:absolute, position:relative, (and position:fixed, which IE6 doesn't support). Float:left and float:right might be helpful too, but without seeing a mock-up of what you're looking for, I can't really tell you much more.

P.S. You can also use style sheets to give the body a width.. it'd look like
Code:
body {
width:600px;
}
or use height and width styles on a div like so:
Code:
<div style="height:500px;width:300px;">
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.