Hi Everyone, I have a problem about css hack, when the browser is IE 7, I just want add some simple css style to the website ( just like the css-tricks.com). What should I do ?
The idea is that you create a main stylesheet that works for the vast majority of browsers.
If you have specific tweaks to make to get your site to work or look the same in IE you only write those styles in the IE sheet.
You link to the IE sheet AFTER the main one and the cascade will overwrite the CSS styles that will only be affected for IE.
However, in the unlikely event that you have a style on your main sheet that you don't want in IE (and I can't think of one off hand), the "Yes", you would have to alter it in your IE sheet.
I have a problem about css hack, when the browser is IE 7, I just want add some simple css style to the website ( just like the css-tricks.com). What should I do ?
I have to reset all these defined styles ?
If you have specific tweaks to make to get your site to work or look the same in IE you only write those styles in the IE sheet.
You link to the IE sheet AFTER the main one and the cascade will overwrite the CSS styles that will only be affected for IE.
However, in the unlikely event that you have a style on your main sheet that you don't want in IE (and I can't think of one off hand), the "Yes", you would have to alter it in your IE sheet.
Eg: .lt-ie8