Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When applying a padding-top value to <body>
when <body>
has a background image applied to it, the vertical positioning of the background isn't respected. Applying a margin instead respects proper positioning of the background image when logged in under an account with admin as well as anonymously.
Comment | File | Size | Author |
---|---|---|---|
toolbar-20100517.patch | 927 bytes | SteveK | |
Comments
Comment #1
SteveK CreditAttribution: SteveK commentedchanging to dev release.
Comment #2
aspilicious CreditAttribution: aspilicious commentedComment #4
casey CreditAttribution: casey commentedInteresting. Margin-top on the HTML element doesn't work in IE6 however. But adding the padding to HTML instead to the BODY seems to be a good idea as body's background-image will move along. I am going to include this in #787940: Generic approach for position:fixed elements like Toolbar, tableHeader.
Comment #5
sunBefore even remotely considering this approach, you need to provide evidence that this trick works flawlessly in all browsers, platforms, and versions (including IE6).
To my knowledge, it does not.
Comment #6
casey CreditAttribution: casey commentedYike, I found out the padding-top on HTML only works when it also has an background. But when you give HTML a background color, BODY no longer stretches its height to window's height.
margin-top on the HTML doesn't work in IE6. In IE7 the margin-top works, but the background-image is not moved along.
Edit
Relevant links
Ah, that's why padding-top on HTML only works when it also has an background.
margin-top on HTML
margin-bottom on HTML