开发者

Problem with HTML / CSS Positioning: big space below the footer

I have an image representation of graph made with .png images and -m开发者_StackOverflowoz-border CSS trick (div id=gholder) I want that graph to be positioned as where the picture shows, And I did it using CSS position: absolute/relative tags, but I'm having problem using the two tag. When I use this CSS code

#gholder {
    float: left;
    bottom: 460px;
    left: 60%;
    position: relative;
}

The site shows a big space below the footer, is there a way to remove that big space when using the relative code?


Relative positioning always leaves a space where the element originally was. If you use absolute it should work correctly.

`#gholder { bottom: 460px; left: 60%; position: absolute;}`

You also don't need the float tag.

If the problem is that you want the main content div lines to stretch to the width of both divs, I'd create a div which contains both the content and the graph, and set it to a defined width and have the top and bottom line in it.

Then inside that div define a width for your content div and position it, then do the same for the graph div.

Think that makes sense.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜