I am trying to control font size in an eBay listing such that it will look the same (more or less) on Firefox and Internet Explorer 8.
To simplify things I just specify a single font size for the entire body text:
<body style="font-family: Verdana; font-size: 12px;">
...
</body>
Yet, while locally (on my PC) the font looks as I want it to look like:
Firefox 3.6:
Internet Explorer 8:
On eBay itself, the font looks much bigger (which is not what I want):
Firefox 3.6 on eBay:
Internet Explorer 8 on eBay:
I tried of course different font-size unit specification (em, %, etc.) but the discrepancy remains.
Why is this happening and how can I get around this (without resorting to posting an image of the text…).
I understand that there might be some collision between eBay’s CSS and my HTML (I don’t use any CSS, I only use inline style!), but I don’t know how to tell eBay not to override my style.
Any idea how to overcome this?




Might be a dirty trick, but have you tried overwriting the CSS using the
!importantdeclaration?Like so:
I would suggest you open up Firebug on Firefox (or Chrome’s inspector on Google Chrome) and see what styles are overwriting the ones you added.
Another thing to try is adding those styles (the whole
style=attribute) to the text blocks itself. If that works, your code just isn’t specific enough.Your problem seems to be selector specificity. Here’s what that means:
If I have CSS which applies to all of the elements in a document:
It will be overridden by a more specific selector, like this:
Because the
pis selecting a specific element, while the*broadly selects all of them.When you apply the
style=attribute, like this<body style="..., you are making that CSS very unspecific, like the first chunk of code.Instead, apply the
style=attribute to your HTML:Try to get it as specific as possible, as specific selectors override non-specific ones.