Erik Visser wrote:
> -- 1. -- Padding or margin?
> To lower the text in the middle column (#col_middle) i used:
> margin-top: 6em; The same for the right column. I also could have
> used padding.
>
> Wich one is better margin or padding? And why? Or is the answer:
> depends.. If so, in which cirumstances do you use padding and in
> which margin?
Margins are fine - as long as you don't become confused if the vertical
ones collapse. Not a problem in that page (so far).
Paddings are fine - but they expand the element they're set on. May not
look right with a background.
So, it's a mixed matter which depends on what you try to achieve.
FWIW: I use margins in most cases where I want distance between
elements, because that's real distance (not just space). Collapsing
margins are easily dealt with as long as we know what happens.
> -- 2. -- About the horizontal menu.
> The colored horizontal menu's left and right zone are white. But the
> left white part should be blue. So i gave .hnav a blue background and
> tried all sorts of things. But it still keeps comin up as white.
.hnav doesn't expand to contain #nav (except in IE), so it won't show up.
The addition of...
#header {background: blue; height: auto;}
.hnav {background: #fff;}
#nav {overflow: hidden; background: #fff;}
...will make it look as you describe - blue on left side and white on
right side.
> http://beta.erikvisser.net/24-10/index.shtml
regards
Georg
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/