Jump to content

Adjusting line height in FF


dalewb

Recommended Posts

I am trying to move a line upwards in FireFox, but when I do so, it screws it up in IE. Some things, also, do not work at all: bottom padding, bottom margins, vertical-align: super or top. Changing line height to something like .1em works but it screws the line up in IE. I have spent nearly an hour on just this one lousy problem (not to mention all the others).Here's the info I can give:movelineupinff_lr.jpgThe text in the navbar is being influenced by the following customized link code, but I don't think it affects this issue. Regardless, I'll post it here just in case:

#navlinks li.last {	border-right: 0;	}#navlinks a:link {	font-family: Verdana, sans-serif;	font-variant: small-caps;	text-decoration: none;	font-size: 16px;	color: black;	font-weight: bold;	}#navlinks a:hover {	font-family: Verdana, sans-serif;	font-variant: small-caps;	text-decoration: none;	font-size: 16px;	color: #CCCFE6;	font-weight: bold;	padding: 18px 0 15px 0;	background: transparent url(../images/gradient-clear_to_darkblue.gif) bottom repeat-x;	}#navlinks a:visited {	font-family: Verdana, sans-serif;	font-variant: small-caps;	text-decoration: none;	font-size: 16px;	color: black;	font-weight: bold;	}

Thanks.

Link to comment
Share on other sites

IE is sooooooooo awesome like that. :) I would strongly suggest using a conditional comment like this:

<!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen, projection" href="style_IE.css" /><![endif]-->

That will pick up IE version 6 and below. You will need to create another style sheet for IE. That way you can make whatever settings that work for Firefox and leave them alone. Then adjust the settings so the page renders correctly in IE.As soon as IE 7 becomes more popular, you will probably have to create another style sheet just for IE7.PUT YOUR HANDS TOGETHER FOR MICROSOFT EVERYONE!!! :)

Link to comment
Share on other sites

Thanks Sam. Do I just plop that line of code in the HTML inside the header? Do I need to do anything else to it? Oh wait, it looks like I need a special CSS file called style_IE.css that I can copy the styles from my main CSS file into and adjust accordingly for IE. Do I have that right?

Link to comment
Share on other sites

Should only have to include in the IE file the CSS for the elements that are causing you grief. The other elements can pickup the styles from the Main CSS file. Theoretically.

Link to comment
Share on other sites

  • 1 month later...
Before you go through all that work, you should try this:
#navlinks {vertical-align: middle;}

Just add that to #navlinks, see if it works...

I wasn't aware anyone had replied to this thread. I tried your method and it didn't do a thing in IE (v7). It seemed to nudge the text down about 1mm in Firefox. Believe it or not, I am still fighting with this same issue and am working to resolve it. If I figure it out, I will reply here.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...