开发者

Why is my element ignoring my stylesheet?

I developed a forum theme and only recently noticed that the feeds near the bottom are unevenly sized, even though there is a min-height property on both the feed and the boxes themselves. The strange part is that it 开发者_运维知识库works completely fine on every other part of the site, as evidenced here. Is there any reason why it is ignoring my stylesheets?


In firebug, it shows that the height is set on the div itself. That usually implies that it was set with a style attribute on the element itself, or it was set via javascript.

Do you have any javascript setting the size of those divs?

UPDATE

I actually found the culprit. in jquery.vticker.js line 58, it is setting the height to 290px. It looks like it is grabbing the tallest li and multiplying that by 2 to set the height.

I don't know anything about vticker, but hopefully this will point you in the right direction. Maybe populate the ticker after the size has been set?


I'm not sure where you're trying to set those font-sizes but they're currently coming from footercss.css.

.col_head {
    color: white;
    font-size: 24pt;
}

.rssFeed {
    font-family: Arial;
    font-size: 90%;
}

Maybe those styles need to be adjusted.


Looking at your elements via firebug, I notice that the taller one has a height declared directly on the node of 290px. This is taller than the min-height, so therefore it will always be taller than the right-hand list. Manually removing the height on the left-hand feed brought them back to the same height.

Given that this height is not set in the CSS or the HTML itself, it must be being set by the JavaScript. Since the majority of your JS code has been minimized, it's not easy to determine where this height is coming from. I suggest you look through your JS code and see what might be setting the height (on the left hand one, #ticker1).


Check with firebug for errors and overriding styles.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜