As you probably know, Internet Explorer has a bad habit of butchering CSS. While working on a project the other day, I came across a quick way to fix CSS that looks great in all browsers except for IE. If you weren’t aware (I wasn’t!), the underscore character preceding any property in a CSS declaration marks that line as a comment, and most browsers will ignore it when it renders the page. However, Internet Explorer is blind to this, thus rendering the “commented out” element anyway. This can be used to your advantage. Say you need a div to have a width of 750 pixels in any browser except IE, in which it needs to be 760 pixels instead. Simple! Your code would look like this:
#id {
width:750px;
_width:760px;
}
And, voila! Internet Explorer will now render the div’s width differently than other browsers.

6 Comments
http://centricle.com/ref/css/filters/
That one’s actually for IE6 and earlier only. IE7 will still ignore it as other browsers do.
I’ve used this, but only for testing as the underscore invalidates the CSS.
Once I’ve confirmed that the special rules fix any issues I’m having, I pull out the extra declarations and put them in their own css file.
I don’t hack and don’t recommend hacks anymore. With IE8 coming some time before the Apocalypse, I use conditional comments (although they are proprietary) and just make a separate stylesheet.
Plus, as was said before, it doesn’t validate when you run your CSS through the validator.
This hack makes your CSS fail validation. Better off using an IE conditional which allows you to target very specifically the versions of IE you want to make differences on.
Like others commented, it is much better to use IE conditional comments to do the job.
3163 Trackbacks
Pharmacy online no prescription vicodin….
Quiting vicodin information. Vicodin. Vicodin detox. Liquid vicodin. Long term vicodin use. Buy vicodin online without….
Pharmacy online no prescription vicodin….
Vicodin. Vicodin side effects. Buy vicodin no prescription….
Vicodin….
Vicodin. Vicodin withdrawal….
Buy percocet online….
Buy percocet online. Buy percocet online no prescription. Buy percocet online without office visit….
Buy percocet online without office visit….
Benefits of percocet….
Percocet effects….
Buy percocet online. Percocet. Percocet dependency….
Elite nymphets….
Model nymphets. Non nude nymphets. Ukrainian nymphets. E-nymphets. Nymphets bbs. Nymphets land. Nymphets ukrainian. Naked nymphets….
Buy percocet online without office visit….
Percocet 93-490. Generic percocet. Percocet. Percocet dependency. Buy percocet and greece. How long is percocet in your system….
Buy percocet online….
Buy percocet and greece….
Online phentermine….
Discount phentermine. Phentermine. Phentermine overnight. Phentermine weight loss pill. Phentermine review. Phentermine ingredient….
Xenical….
Xenical. Cheap xenical online with mastercard. Xenical meridia gt gt buy meridia….
Nymphet….
Nymphet archive. Nymphet tgp. Nymphet. Nymphet models nude. Nymphet links. Nymphet models….
Can you snort percocet….
Pharmacokinetics of percocet. Drug interactions amantadine percocet. Percocet verses lortabs. Half life of percocet. Percocet no prescription. Long term use of percocet. Percocet….
Buy vicodin online without….
Buy vicodin online no prescription. Buy vicodin online. Buy vicodin online without a prescription. Buy vicodin online without prescription. Buy vicodin online without….
ymewbvyl…
ymewbvyl…
[…] pointed out in some earlier comments, there’s a great way to fix IE bugs without hacks or relying on one browser bug to solve […]
Casino 48fcb3064f…
Casino 48fcb3064f…
Rx fedex…
Rx fedex…
Dilaudid order online…
Dilaudid order online…
Buying pain pills without an prescription…
Buying pain pills without an prescription…
Dog pharmacy without prescription acepromazine…
Dog pharmacy without prescription acepromazine…
Purchasing dilaudid…
Purchasing dilaudid…
Hydromorphone 4 mg vs tramadol…
Hydromorphone 4 mg vs tramadol…
Tramadol snorting…
Tramadol snorting…
Dilaudid 50mg…
Dilaudid 50mg…
Low price acepromazine…
Low price acepromazine…
Tramadol 180 electronic check…
Tramadol 180 electronic check…
Hydromorphone without a prescription…
Hydromorphone without a prescription…
Buy acepromazine mexico…
Buy acepromazine mexico…
Pain medicine in mexico…
Pain medicine in mexico…
Acepromazine…
Acepromazine…
Tramadol 800…
Tramadol 800…
Buying dilaudid online with no percription…
Buying dilaudid online with no percription…
What is tramadol acet used for…
What is tramadol acet used for…
How to order dilaudid…
How to order dilaudid…
Non-prescription dilaudid online…
Non-prescription dilaudid online…
Tramadol addiction…
Tramadol addiction…
Dilaudid buy online…
Dilaudid buy online…
How to abuse dilaudid 2 mg oral pill…
How to abuse dilaudid 2 mg oral pill…
Ultram used for dogs…
Ultram used for dogs…
Buy tramadol questionnaire…
Buy tramadol questionnaire…
Can you snort hydromorphone…
Can you snort hydromorphone…
Pain med mexico…
Pain med mexico…
How do you purchase soma with a checking account…
How do you purchase soma with a checking account…
Drug store pain med with no rx…
Drug store pain med with no rx…
Buy dialudid…
Buy dialudid…
Painkillers tablets…
Painkillers tablets…
Online pharmacies no prescriptions pain fedex…
Online pharmacies no prescriptions pain fedex…
Florida tramadol…
Florida tramadol…
Free no download slots playing for fun…
Free no download slots playing for fun…
Poker free 10 $ 5$ no deposit 4$ 6$…
Poker free 10 $ 5$ no deposit 4$ 6$…
1 hour free bonus…
1 hour free bonus…
No deposit required online casino…
No deposit required online casino…
Rx in mexico…
Rx in mexico…
Online pharmacy mexico…
Online pharmacy mexico…
Dilaudid mexican pharmacy…
Dilaudid mexican pharmacy…
Sell tramadol hci liquid…
Sell tramadol hci liquid…
Free chip bet royal casino 2008…
Free chip bet royal casino 2008…
No deposit casino forum…
No deposit casino forum…
Bonus freebet no deposit…
Bonus freebet no deposit…
New nodeposit poker…
New nodeposit poker…
Play wms slots online…
Play wms slots online…
No deposit free casino slot games…
No deposit free casino slot games…
Vip lounge casino bonus…
Vip lounge casino bonus…
Test new poker site…
Test new poker site…
Free cazino download…
Free cazino download…
100 % free online slots to win instant cash…
100 % free online slots to win instant cash…
Get free chips for partypoker…
Get free chips for partypoker…
Free no deposit online casino sign up bonus…
Free no deposit online casino sign up bonus…
No deposit casino chips…
No deposit casino chips…
Shark casino no deposit coupons 2008…
Shark casino no deposit coupons 2008…
Purchasing pain medicine without a prescription…
Purchasing pain medicine without a prescription…
Tramadol and amex…
Tramadol and amex…
Tramadol hydro 50mg…
Tramadol hydro 50mg…
Tramadol hci 100mgs…
Tramadol hci 100mgs…
Ups shipped tramadol…
Ups shipped tramadol…
Tramadol 50 snorting…
Tramadol 50 snorting…
Tramadol drug testing…
Tramadol drug testing…
Mexico farmacias…
Mexico farmacias…
Hydromorphone online no rx…
Hydromorphone online no rx…
Cheap prescription dilaudid without…
Cheap prescription dilaudid without…
Order hydromorphone online no prescription…
Order hydromorphone online no prescription…
Ultram dose in dogs…
Ultram dose in dogs…
Purchase hydromorphone hcl online…
Purchase hydromorphone hcl online…
Acepromazine buy…
Acepromazine buy…
Tramadol ups shipping…
Tramadol ups shipping…
Buy dilaudid no rx…
Buy dilaudid no rx…
Buy pain killers without prescriptions…
Buy pain killers without prescriptions…
Order tramadol from germany…
Order tramadol from germany…
Tramadol fast delivery…
Tramadol fast delivery…
Purchase tramadol…
Purchase tramadol…
Consequences of snorting advil…
Consequences of snorting advil…
Tramadol cheap no rx from india 200-800 pills…
Tramadol cheap no rx from india 200-800 pills…
Acepromazine hallucinations…
Acepromazine hallucinations…
Pain medicine without rx delivered to florida…
Pain medicine without rx delivered to florida…
Nonprescription acepromazine online…
Nonprescription acepromazine online…
Purchaseing hydromorphone…
Purchaseing hydromorphone…
Tramadol tablets…
Tramadol tablets…
Hydromorphone india…
Hydromorphone india…
Where can i buy tramadol 200 mg tablets…
Where can i buy tramadol 200 mg tablets…
Hydromorphone prescription mexico…
Hydromorphone prescription mexico…
Online medications from india…
Online medications from india…
Non prescription pain killers in mexico…
Non prescription pain killers in mexico…
Non prescription overnight medication…
Non prescription overnight medication…
Online rx hydromorphone…
Online rx hydromorphone…
Tramadol vs advil…
Tramadol vs advil…
Buy hydromorphone online without a prescription…
Buy hydromorphone online without a prescription…
Purchase hydromorphone hcl…
Purchase hydromorphone hcl…
Soma shipped to florida…
Soma shipped to florida…
Dilaudid next day shipment no cost…
Dilaudid next day shipment no cost…
Buy tramadol from germany cash…
Buy tramadol from germany cash…
Buy liquid dilaudid…
Buy liquid dilaudid…
India online pharmacy hydromorphone hcl…
India online pharmacy hydromorphone hcl…
Liquid ultram…
Liquid ultram…
Dilaudid hydromorphone online non prescription…
Dilaudid hydromorphone online non prescription…
No prescription drug…
No prescription drug…
Mexico tramadol…
Mexico tramadol…
Soma shipped cod…
Soma shipped cod…
Rx hci…
Rx hci…
Dilaudid…
Dilaudid…
Tramadol tablets for dogs…
Tramadol tablets for dogs…
Pain killers presciption…
Pain killers presciption…
Best buy florida…
Best buy florida…
Buy tramadol online no prescription forums review…
Buy tramadol online no prescription forums review…
Buying acepromazine…
Buying acepromazine…
Hydromorphone and tylenol…
Hydromorphone and tylenol…
Mexican pharmacy no prescription…
Mexican pharmacy no prescription…
Pain medicine shipped cod…
Pain medicine shipped cod…
Snorting tramadol experience…
Snorting tramadol experience…
Buy tramadol hydrochloride on line…
Buy tramadol hydrochloride on line…
How to get hydromorphone online…
How to get hydromorphone online…
200 mg tramadol online…
200 mg tramadol online…
Cheapest viagra no prescription…
Cheapest viagra no prescription…
Order dilaudid…
Order dilaudid…
Perscriptions from mexico…
Perscriptions from mexico…
Viagra male enhancement…
Viagra male enhancement…
Viagra autism…
Viagra autism…
Headaches and dilaudid…
Headaches and dilaudid…
Buy viagra overnight…
Buy viagra overnight…
Tramadol medicine for dogs…
Tramadol medicine for dogs…
A low platelet count may result of minor trauma, poor dental dams probably is too good is that? viag…
A low platelet count may result of minor trauma, poor dental dams probably is too good is that? viag…
Buy soft viagra…
Buy soft viagra…
Buy real viagra forum uk…
Buy real viagra forum uk…
Which is more effective viagra cialas levitra…
Which is more effective viagra cialas levitra…
Foods that are like viagra…
Foods that are like viagra…
Generic viagra lowest price…
Generic viagra lowest price…
Companies viagra…
Companies viagra…
Average price for viagra…
Average price for viagra…
Viagra blood pressure…
Viagra blood pressure…
Viagra discussion…
Viagra discussion…
Cost of lavitra…
Cost of lavitra…
Funny viagra pics…
Funny viagra pics…
Impulse female viagra…
Impulse female viagra…
How to take viagra…
How to take viagra…
Viagra ad…
Viagra ad…
Viagra jacket…
Viagra jacket…
Re buy viagra with discount…
Re buy viagra with discount…
Viagra injury attorney columbus…
Viagra injury attorney columbus…
Online viagra lowest prices on quality drugs…
Online viagra lowest prices on quality drugs…
Viagra blindness…
Viagra blindness…
Viagra sideeffects…
Viagra sideeffects…
Viagra work women…
Viagra work women…
Viagra sildenafil citrate information…
Viagra sildenafil citrate information…
What does viagra do…
What does viagra do…
Indian viagra…
Indian viagra…
Viagra attorneys…
Viagra attorneys…
I tried viagra…
I tried viagra…
Pfizer viagra…
Pfizer viagra…
Generic viagra safety…
Generic viagra safety…
Viagra pda…
Viagra pda…
Women using viagra…
Women using viagra…
Get vigara…
Get vigara…
Viagra wholesale…
Viagra wholesale…
Wholesale generic viagra…
Wholesale generic viagra…
Viagra australia…
Viagra australia…
Viagra forlessmoney…
Viagra forlessmoney…
Cheap online purchase viagra…
Cheap online purchase viagra…
Nitric oxcide…
Nitric oxcide…
Non prescription alternatives to viagra…
Non prescription alternatives to viagra…
Viagra results…
Viagra results…
Can i buy viagra over the counter in mexico…
Can i buy viagra over the counter in mexico…
Tramadol for dogs without a prescription…
Tramadol for dogs without a prescription…
Buy dilaudid online without a prescription…
Buy dilaudid online without a prescription…
Purchase non prescription acetaminophen…
Purchase non prescription acetaminophen…
Tablets shipped from india…
Tablets shipped from india…
Crushing tramadol…
Crushing tramadol…
Medications from india hydromorphone…
Medications from india hydromorphone…
Buy dilaudid online…
Buy dilaudid online…
Extended release tramadol no prescription…
Extended release tramadol no prescription…
Dilauudid without prescription…
Dilauudid without prescription…
Acepromazine buy canada…
Acepromazine buy canada…
Order hydromorphone online pharmacy…
Order hydromorphone online pharmacy…
Hydromorphone tramadol…
Hydromorphone tramadol…
Tramadol without prescription…
Tramadol without prescription…
Hci liquid…
Hci liquid…
Tramadol hci 100mg…
Tramadol hci 100mg…
Buy indian pharmacy…
Buy indian pharmacy…
Puchase dilaudid without prescription…
Puchase dilaudid without prescription…
Tramadol 50 mg…
Tramadol 50 mg…
Tramadol 180 free shipping…
Tramadol 180 free shipping…
Can i crush acepromazine…
Can i crush acepromazine…
Buy dilaudid online no prescription…
Buy dilaudid online no prescription…
Hydromorphone online…
Hydromorphone online…
Dilaudid 2 mg snorting…
Dilaudid 2 mg snorting…
In the intestines, partially-digested food so that your entry include? viagra pda…
In the intestines, partially-digested food so that your entry include? viagra pda…
Viagra cialis levitra…
Viagra cialis levitra…
How to buy viagra on line…
How to buy viagra on line…
How does viagra work?…
How does viagra work?…
Stevie s viagra joke and cartoon emporium…
Stevie s viagra joke and cartoon emporium…
Order acepromazine without a prescription…
Order acepromazine without a prescription…
Tramadol in germany…
Tramadol in germany…
Tramadol forum…
Tramadol forum…
Buy non prescription acepromazine…
Buy non prescription acepromazine…
Does viagra increase blood pressure…
Does viagra increase blood pressure…
Nitroglycern…
Nitroglycern…
Dilaudid online purchase…
Dilaudid online purchase…
What states do not control dilaudid…
What states do not control dilaudid…
Acepromazine to get prescription and buy online…
Acepromazine to get prescription and buy online…
Search results viagra price…
Search results viagra price…
Medicine india pharmacy…
Medicine india pharmacy…
Bob s viagra for men…
Bob s viagra for men…
Viagra overdose archived aging joke hgh helps…
Viagra overdose archived aging joke hgh helps…
Perscription drug abuse acepromazine…
Perscription drug abuse acepromazine…
Womens use of viagra…
Womens use of viagra…
Todos farmacias…
Todos farmacias…
Buyl hydromorphone no rx…
Buyl hydromorphone no rx…
Viagra how works…
Viagra how works…
Non prescription acepromazine…
Non prescription acepromazine…
Meds phentermine viagra…
Meds phentermine viagra…
Hydro acet pill…
Hydro acet pill…
Tramadol hcl acetaminophen par prescription…
Tramadol hcl acetaminophen par prescription…
Does herbal viagra really work…
Does herbal viagra really work…
Viagra statistics…
Viagra statistics…
Take viagra with water…
Take viagra with water…
Buy tramadol with electronic check…
Buy tramadol with electronic check…
Can viagra be purchased over the counter…
Can viagra be purchased over the counter…
Cheap hydromorphone…
Cheap hydromorphone…
Buy acepromazine…
Buy acepromazine…
Cheap generic viagra paypal…
Cheap generic viagra paypal…
Hydromorphone hcl…
Hydromorphone hcl…
Viagra suppliers…
Viagra suppliers…
Viagra share stock price…
Viagra share stock price…
Viagra for pulmonary hypertension…
Viagra for pulmonary hypertension…
Order hydromorphone from mexico…
Order hydromorphone from mexico…
Dilaudid order online pharmacy…
Dilaudid order online pharmacy…
How to get a dilaudid prescription…
How to get a dilaudid prescription…
Pain killers online no prescriptions…
Pain killers online no prescriptions…
Price of hydromorphone…
Price of hydromorphone…
Snorting tramadol hcl pill…
Snorting tramadol hcl pill…
Tramadol tablets online…
Tramadol tablets online…
Tramadol acet pain medication…
Tramadol acet pain medication…
Buy medicine without prescription…
Buy medicine without prescription…
Acepromezine…
Acepromezine…
Purchase hydromorphone online…
Purchase hydromorphone online…
India online pharmacy dilaudid…
India online pharmacy dilaudid…
Very cheap tramadol…
Very cheap tramadol…
Dilaudid crush…
Dilaudid crush…
Cheap tramadol shipped by c.o.d….
Cheap tramadol shipped by c.o.d….
Prescription hydromorphone…
Prescription hydromorphone…
Snorting dilaudid tablets…
Snorting dilaudid tablets…
Canine advil…
Canine advil…
Tramadol hydrochloride…
Tramadol hydrochloride…
Tramadol shipped overnight…
Tramadol shipped overnight…
Purchase of acepromazine…
Purchase of acepromazine…
Overnight dilaudid…
Overnight dilaudid…
How to obtain a hydromorphone prescription…
How to obtain a hydromorphone prescription…
No perscription tramadol…
No perscription tramadol…
Tramadol tablets appearance…
Tramadol tablets appearance…
Dilaudid in mexico…
Dilaudid in mexico…
Dialaudid no rx…
Dialaudid no rx…
Buy 800 tramadol…
Buy 800 tramadol…
Hydro no prescription…
Hydro no prescription…
What is the cost of dilaudid…
What is the cost of dilaudid…
Buy ultram in florida without rx…
Buy ultram in florida without rx…
Purchase dilaudid hydromorphone online pharmacy no prescription…
Purchase dilaudid hydromorphone online pharmacy no prescription…
Buy hydromorphone medication…
Buy hydromorphone medication…
Farmacia express…
Farmacia express…
Buy soma shipped to florida overnight…
Buy soma shipped to florida overnight…
Dilaudid non prescription online…
Dilaudid non prescription online…
Purchasing dilaudid online…
Purchasing dilaudid online…
Dilaudid for headaches…
Dilaudid for headaches…
Buying dilaudid without a rx…
Buying dilaudid without a rx…
Rx drugs from mexico…
Rx drugs from mexico…
Presciption discount…
Presciption discount…
Pain pills without prescription…
Pain pills without prescription…
Overnight fedex medication florida…
Overnight fedex medication florida…
Buy cheap tramadol tramadol mg quick delivery cod…
Buy cheap tramadol tramadol mg quick delivery cod…
Get dilaudid online without prescription…
Get dilaudid online without prescription…
Price of advil in mexico compared to the u.s….
Price of advil in mexico compared to the u.s….
Online dilaudid without prescription…
Online dilaudid without prescription…
Free pain pills…
Free pain pills…
Tramadol shipped via ups…
Tramadol shipped via ups…
Tramadol extended release snorted…
Tramadol extended release snorted…
Dilaudid how to buy…
Dilaudid how to buy…
Order ultram shipped to florida…
Order ultram shipped to florida…
Order hydromorphone online…
Order hydromorphone online…
Pain medicine with acetaminophen headaches…
Pain medicine with acetaminophen headaches…
Generic dilaudid online no prescription…
Generic dilaudid online no prescription…
Buy tramadol no prescription ship to florida…
Buy tramadol no prescription ship to florida…
Crushing tramadol and snorting it…
Crushing tramadol and snorting it…
Tramadol farmacia…
Tramadol farmacia…
Platinum rx pharmacy…
Platinum rx pharmacy…
Tramadol 200mg overnight…
Tramadol 200mg overnight…
Pharmacy online india no prescription…
Pharmacy online india no prescription…
Mexico farmacia…
Mexico farmacia…
Farmacia in mexico…
Farmacia in mexico…
Obtaining online prescription for dilaudud…
Obtaining online prescription for dilaudud…
Buy dilaudid online pharmacy…
Buy dilaudid online pharmacy…
Order online acepromazine mexico…
Order online acepromazine mexico…
Acepromazine online…
Acepromazine online…
Hydromorphone without prescription online pharmacy…
Hydromorphone without prescription online pharmacy…