Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:40 PM
Ney André de Mello Zunino
Guest
 
Posts: n/a
Default Absolute positioning and margins

Hello.

Should /margin/ properties take effect on absolutely-positioned blocks?
I thought not, but the referred sample HTML [1] seems to prove me wrong
both on IE 6.0 and Firefox 0.8. I thought the /margin/ property should
have no effect, since the location of the positioned block is being
controlled by the /top/, /left/, etc. properties. The CSS2 Specification
states:

"Positioned elements generate positioned boxes, laid out according to
four properties: [top, right, bottom, left]"

There is no mention of /margin/. So, if I intend to have a block at (0,
0), I should only have to set /top/ and /left/ to 0 and not be concerned
about setting /margin-top/ and /margin-left/ to 0 as well.

Does anybody see something in the text of the Specification which I may
have missed?

[1] http://undl.org.br/temp/absmarg.html

Thank you,

--
Ney André de Mello Zunino
  #2  
Old July 20th, 2005, 11:40 PM
Lauri Raittila
Guest
 
Posts: n/a
Default Re: Absolute positioning and margins

Ney André de Mello Zunino wrote:[color=blue]
> Should /margin/ properties take effect on absolutely-positioned blocks?[/color]

Yes.
[color=blue]
> I thought not, but the referred sample HTML [1] seems to prove me wrong
> both on IE 6.0 and Firefox 0.8.[/color]
[color=blue]
> There is no mention of /margin/ [in spec].[/color]

Not in that place. Read whole spec sometime, it has lots you have missed.
[color=blue]
> So, if I intend to have a block at (0,
> 0), I should only have to set /top/ and /left/ to 0 and not be concerned
> about setting /margin-top/ and /margin-left/ to 0 as well.[/color]
[color=blue]
> Does anybody see something in the text of the Specification which I may
> have missed?[/color]

This, for example.
http://www.w3.org/TR/CSS21/visudet.h...replaced-width

Especially the blockquote in the middle of that section. I wonder where
they quoted it...


--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
I'm looking for work | Etsin työtä
  #3  
Old July 20th, 2005, 11:40 PM
Gus Richter
Guest
 
Posts: n/a
Default Re: Absolute positioning and margins

Ney André de Mello Zunino wrote:[color=blue]
> Hello.
>
> Should /margin/ properties take effect on absolutely-positioned blocks?
> I thought not, but the referred sample HTML [1] seems to prove me wrong
> both on IE 6.0 and Firefox 0.8. I thought the /margin/ property should
> have no effect, since the location of the positioned block is being
> controlled by the /top/, /left/, etc. properties. The CSS2 Specification
> states:
>
> "Positioned elements generate positioned boxes, laid out according to
> four properties: [top, right, bottom, left]"
>
> There is no mention of /margin/. So, if I intend to have a block at (0,
> 0), I should only have to set /top/ and /left/ to 0 and not be concerned
> about setting /margin-top/ and /margin-left/ to 0 as well.
>
> Does anybody see something in the text of the Specification which I may
> have missed?
>
> [1] http://undl.org.br/temp/absmarg.html
>
> Thank you,
>[/color]

http://www.w3.org/TR/CSS21/box.html#box-dimensions
*Each box has* a content area (e.g., text, an image, etc.) and optional
surrounding *padding, border, and margin* areas; ......

--
Gus
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles