Re: [css-d] Reset margins, padding and a gap at the top

2007-06-05 Thread viri bruk
Thank you a lot for your fast answer, it worked. Next time I should be
really more attentive...

Viri
__
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/


Re: [css-d] Reset margins, padding and a gap at the top

2007-06-05 Thread Philippe Wittenbergh

On Jun 5, 2007, at 9:56 PM, viri bruk wrote:

> Say, an HTML page is coded like that:
>
>  "http://www.w3.org/TR/html4/strict.dtd";>
> []
>   body {
>   margin:0;
>   padding:0;
>   }
>   
>   
>   Page's title
>   
>   
>   Header
>   Some text goes here.
> [...]
>
> On the new Firefox and Opera this does not seem to work, whitespace
> remains at the top. Is it because of using HTML 4.01 or is it some
> other problem?
This has nothing to do with html 4.01. Most block level elements have  
a default margin at the top (and bottom).
In IE 6 and 7 you won't see that top margin on your h1, but that is a  
bug in IE, caused by the fact that  'hasLayout' [1].
setting h1 {margin-top:0} would remove that gap if you want.

[1] 

Philippe
---
Philippe Wittenbergh





__
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/


Re: [css-d] Reset margins, padding and a gap at the top

2007-06-05 Thread css-d

Viri,

The whitespace you're seeing is caused by the default margin on the h1 element.
Setting * { margin: 0; padding: 0; } works because the * selects every element 
on the page (effectively setting h1 { margin: 0; padding: 0; }).

Hope this helps,
Rob

--
Rob Wilmshurst
[EMAIL PROTECTED]


__
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/


[css-d] Reset margins, padding and a gap at the top

2007-06-05 Thread viri bruk
Hello, recently I've started to learn HTMl and CSS again, and noticed
an interesting feature.

Say, an HTML page is coded like that:

http://www.w3.org/TR/html4/strict.dtd";>




body {
margin:0;
padding:0;
}


Page's title


Header
Some text goes here.



On the new Firefox and Opera this does not seem to work, whitespace
remains at the top. Is it because of using HTML 4.01 or is it some
other problem?

Because if the style is written like this: * {margin:0; padding:0;} it
works miraculously.

Thanks for answers, Viri.
__
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/