/    Sign up×
Community /Pin to ProfileBookmark

Hope this helps…

One thing that you have to bear in mind (don’t know though if it will actually help you):

setting padding (right + left) values on IE and 100% width doesn’t affect the 100% width whatsoever.

Doing the same thing though in Mozilla causes the padding values to be added to the overall width, thus making it > 100%…

Hope this helps to avoid problems in the future….?

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@StefanNov 29.2002 — There is an easy workaround for that however. You can take advantage of other IE bugs to feed it the wrong value while still alowing the correct use of padding for browsers like Mozilla.

Here is also examples of how to work around bugs in Opera 3-5, 6, 7b and IE/Mac

div.myDiv{

color: black; /* Used by IE5/win & IE5.5/win */

voice-family: ""}""; voice-family:inherit;

color: blue; /* Used by IE6/win */

}

html>body div.myDiv {

color: red; /* Used by Opera 3-5 */

color: lime; /* Used by Opera 6 (any letter G-Z can be escaped with a backslash in CSS) */

}

head:first-child+body div.myDiv {

color: green; /* Used by Opera 7beta & IE5/Mac */

}

html[xmlns] div.myDiv {

color: purple; /* Used by Gecko when XHTML sent as text/html */

}

The above examples should be interpreted as:

a specific browser will understand the rules before it's mentioned and also all the rules above it in the list.

Thus eg html[xmlns] div.myDiv for Mozilla is only needed for when you need to work around a bug in eg Opera 7beta.

To work around an IE/Win bug you just use div.myDiv to feed IE the wrong values and then html>body div.myDiv to provide the (theoretically) correct CSS to basicly all other browsers.
×

Success!

Help @cssrules spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...