开发者

h2 margin or padding is greater than h3 even if they have same font-size?

I'm running into开发者_如何学编程 a strange problem.

Trying to style h2 and h3 similar. So they look identical on different pages.

I've ready samples too, please take a look:

http://artvard.com/category.html this h2 posttittle should have exact same margins as -> http://artvard.com/main.html h3 posttittle.

for some strange reason, they have different margin/padding at the top, so spacing looks different.

h2 margin or padding is greater than h3 even if they have same font-size?

I'm running out of ideas on how to solve this :(


I see in your CSS you have set your font sizes on the <a> elements inside the post titles - this means that the post titles themselves still have differing font sizes, and different line heights, which is where the discrepancy in spacing is coming from.

Try changing

h3.posttittle a, h2.posttittle a {
    color:#E95D01;
    font-size:16px;
}

to

h3.posttittle, h2.posttittle {
    font-size: 16px;
}

h3.posttittle a, h2.posttittle a {
    color:#E95D01;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜