开发者

css issue with tables

I asked a question a few minutes ago and tried all of the suggestions. I still am having an issue getting this just right. I have found the block of css that is causing the issues and need a solution.

I have 2 files. The first file has all of the css that I used when I made the form. When I had the form looking the way I liked it, I put all of that relevant code into a different stylesheet. The new stylesheet is overriding some of my values and causing things to look bad.

This is what I want and is all I require.

#password #header td {
padding-top:90px;
vertical-align:top;
}

This however is the block of code that is making things break. I don't want any of this. Is there a way to override it? The line-height specifically is really making things look horrible. If I remove the line height attribute then other parts of my site break.

td, th {
color:#000000;
font-family:verdana,geneva,sans-serif;
font-size:12px;
line-height:17px开发者_StackOverflow;
margin:0;
padding:0;
}


You can override all the attributes in your general css declarations into your specific style and add !important to ensure it is followed, e.g. for line height you can use:

#password #header td {
  padding-top:90px;
  vertical-align:top;
  line-height: normal !important;
}


Try changing line-height to something a little smaller. Something like this (targeting specific problem elements):

#password #header td {
  line-height:10px;
}

You can also specify normal to line-height:

#password #header td {
  line-height:normal;
}


You can directly override it in the specific style, like this:

#password #header td {
    padding-top:90px;
    vertical-align:top;
    line-height:12px; /*Or whatever is relevant*/
}

Check out Firebug's CSS browser and calculator to see what is the "default" value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜