![]() |
CSS Problem with blank space |
Post Reply ![]() |
Author | |
ammonihah ![]() Groupie ![]() Joined: 18-April-2008 Location: United States Status: Offline Points: 57 |
![]() ![]() ![]() ![]() ![]() Posted: 01-April-2010 at 2:19pm |
OK, so I feel like an idiot but have wasted way too much time on something that should be so simple.
On this page: http://www.bestop-powerboard.com/store/pc/viewCategories.asp?idCategory=4 you will see a H1 tag that says Chevrolet PowerBoard. Notice that there is a white space at the top of the background image and it makes the center heading drop down and be out of alignment with the left and right heading boxes labeled Vehicle applications and Browse by Price. Can anybody give me a pointer on what is causing that and how to fix it? It would be very appreciated! ![]() |
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
ammonihah,
Try this: user agents automatically apply some top and bottom margin to heading tags. On .pcMainTable h1, apply a top margin of 0 and then compensate for the placement of the text with a top padding of 10px. |
|
![]() |
|
ammonihah ![]() Groupie ![]() Joined: 18-April-2008 Location: United States Status: Offline Points: 57 |
![]() ![]() ![]() ![]() ![]() |
OK, well that helped me align the text better but that didn't work with respect to the white space, but it gave me an idea. I used a negative number for the top margin and that worked. But I don't know if negative numbers are considered good code. I'm going to test it on Internet Exploder and Firefox, but it worked with Chrome. Thanks for the help and I would love any other input.
|
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
Negative positioning is fine; it's valid W3C styling.
Looks like you've just about got it, but probably a bit less negative margin on the top and ~ 5px less top padding. At least you have a better idea of what to play with here. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |