IE ‘Code’ bug

We had a problem with how code was being displayed on the blog. IE wasn’t respecting the width of the code block and it was throwing the entire layout off.

Here is how I fixed it:

pre code {
 padding: 5px;
 display: block;
 overflow: auto;
/*I had to add this so ie wouldn't put scrollbars both ways.  Seems to be ignored by firefox*/
 overflow-y: visible;
/*I had to add this for ie to respect the width.  I don't know why it didn't respect its container's width*/
 width: 450px;
}
del.icio.us:IE 'Code' bug digg:IE 'Code' bug spurl:IE 'Code' bug wists:IE 'Code' bug simpy:IE 'Code' bug newsvine:IE 'Code' bug blinklist:IE 'Code' bug furl:IE 'Code' bug reddit:IE 'Code' bug fark:IE 'Code' bug blogmarks:IE 'Code' bug Y!:IE 'Code' bug smarking:IE 'Code' bug magnolia:IE 'Code' bug segnalo:IE 'Code' bug gifttagging:IE 'Code' bug

Leave a Reply