Showing posts with label legend. Show all posts
Showing posts with label legend. Show all posts

Thursday 11 April 2013

Yet more fun with IE

I've been working with a good designer recently. To be fair to him, I've made more of an effort to accurately represent his work in IE 7 and 8. My layout has used twitter bootstrap and I discovered 2 things about CSS in IE along the way:
1. To style the <legend> tag, you need to encase your form elements in a <fieldset> tag.
2. To specifically target IE 7 and 8 in your styles, you need to add /9 to the end of styles. These will not affect your styles targeting good browsers. I put these specific styles at the bottom of my stylesheet so that I don't have to hunt round for them at a later date. Here are some examples below. Very quirky.

/*All IE 7 and 8 stuff*/

hr.bluehr
{
width:104.3%\9;
}

#formholder legend
{
margin-left:-6px\9;
}

input[type='text'], input[type='password']
{
width:94%\9;
}

.btn
{
border:1px dotted #EEEEEE\9;
margin-left:-0px\9;
}