Question:
IE7 css padding problem?
............
2008-07-22 10:23:32 UTC
here is my problem. i added padding to my div and reduced the div height accordingly. all browsers except IE7 will render it properly (no surprise...). I have tried a conditional comment to add more padding but it doesnt help one bit.

#contentLargeLeft
{
position:absolute;
padding: 15px 20px 0px 42px;
top:222px;
width:438px;
height:308px;
background-image:url(images/cloud.jpg);
background-repeat:no-repeat;
}

I have tested it on Safari, Firefox 3, Opera, IE8 Beta and IE7 - all but the latter work ok. I have had this problem before but i am stumped as to how to fix it. Adding more padding does not help.
Six answers:
2008-07-22 10:31:33 UTC
Here's a solution:

height: 25px; //Firefox, Most browsers

!height: 16px; //IE7

_height: 20px; //IE6



The last 2 comments only work in IE.



With these ! or _ declarations, you can change the height, width, padding, any CSS for IE7 and IE6, and it won't affect Firefox/most browsers.



--This solution won't validate. You can create a second stylesheet and put all of your IE declarations in it if you want your normal stylesheet to validate.
LittleGrayWolf
2008-07-22 10:35:07 UTC
I hate this kind of issues myself. Seen a number of them.



I found that the conflict for IE comes up when you declare static height/with AND pad the box.

What IE does is add padding to your box, i.e.

Height: 438 + top padding 15 becomes 453 (is my math is correct). Which creates a problem.



I found that the best solution is to have another container inside the static height/width one what is flexible height/with and has the padding parameters.



So you would have:









All your actual content goes here.









Cheers.
apolonia
2016-05-02 03:03:53 UTC
Start wining income with the Zcodes System from here https://tr.im/LNlu9 .

Zcodes System is an easy yet strong system. No further guesswork or counting purely on a really fickle woman Luck. You get just what you need and are found exactly that which you have to do in order to win regularly

In the event that you use Zcodes System you are supplied with detailed video lessons and lessons to show you just how the device operates and things you need to complete in order to make money.

Zcodes System is great for newbies to because even although you know absolutely nothing about activities once you join, you will learn whatever you have to know rapidly and effectively and you will specially discover ways to maximize your spending to reap the best winning rewards.
wilbur
2016-05-16 07:49:46 UTC
If you want to learn ways to leverage it to maximize your activities betting winnings then this system is for you https://tr.im/Vcy01 because Zcodes System is about this.

Zcodes System is the title of a activities betting system that's existed, in a few variety or yet another, because 1999. Zcodes System is an advanced statistically based process that's cracked the “code” of how sports games may enjoy out.

Zcodes System is your absolute best friend in sport betting.
Tracdoor
2008-07-22 10:29:31 UTC
Bloody Microsoft and it stupid browser eh!



I can't see anything wrong with it really, perhaps you better look in Microsoft's re-written guide originally created by the W3 but Microsoft decided to be idiots and make developers lives hell.
2016-04-02 08:44:44 UTC
In short, no. This is part of the job of a web developer. We don't have handy programs to do everything for us. Sometimes, you have to do things manually.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...