On 25/01/07, Christopher Jordan <[EMAIL PROTECTED]> wrote: > Sorry for the off-topic post, but I know that css tends to get discussed > a lot around here, and I'm sure someone here will know what I'm doing wrong. > > Okay, so I've got a div that contains a single <p> tag. In FF 2.0.0.1 > this text is vertically centered inside the div. In IE 6, it is not. So, > I can fix IE by including a line-height equal to the height of the > parent div. Fine, but that screws up FF. It seems that conditional > comments are the solution for me, but I think I'm not using them right, > because they're not working. > > Here's my code: > > ---- snip from css ---- > div.SiteHeader{ > border: 1px solid #336566; /*AAAAAA*/ > width: 850px; > background-color: #E3F0D6; /*D5F0D5,CDD9E5*/ > height: 60px; > text-align: left; > margin: auto; > <!--[if IE 6]> > line-height: 60px; > <![endif]--> > } > p.SiteHeaderText{ > font-size: 20px; > font-weight: bold; > color: #3F6F5E; /*#698DB0 (light), #5880A7 (darker), #4F7396 (darker > still), #466686 (darkest yet)*/ > padding-left: 5px; > } > > ---- end snip ---- > > ---- the html ---- > <div class="SiteHeader"> > <p class="SiteHeaderText">Cottonwood Financial Web Administation</p> > </div> > > Am I not using the conditional comments correctly? This is my first > attempt at ever using them. > > I should also mention I'm using the following DocType: > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" > "http://www.w3.org/TR/html4/strict.dtd"> > > I'd appreciate any help. > > Thanks, > Chris > > > -- > http://cjordan.info
Create a new stylesheet containing your IE hacks (i.e. ie.css) and in the head of your html page (if it is needed for IE7 as well, use <!--[if IE]> instead): <!--[if lt IE 7]> <link rel="stylesheet" href="ie.css" type="text/css" /> <![endif]--> _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/