开发者

Why does CSS looks different

I have some HTML retrieved from a database so I have no control over it and it looks different than if I just put it inside a div :

Why does CSS looks different

Why does CSS looks different

And here is my CSS:

#cvDiv {
    position:absolute;
    top:40px;
    left: 300px;
    border: none;
    width: 720px;
    display:inline;
    background-color:White;
    text-align:justify;
    padding:15px;
    box-shadow: 10px 10px 5px #888;
    -moz-box-shadow: 0px 0px 5px 5px #888;
    -webkit-box-shadow: 0px 0px 5px 5px #888;
    z-index:auto;     开发者_如何学Go
}

and here is the HTML: http://jsfiddle.net/ug96v/

What am I doing wrong?

And what I want to do is a make the the top picture look like the bottom one.

EDIT

This ended up being a DOCTYPE problem.


Don't use position:absolute;, it forces the div to position itself relative to the the first parent container that has position:relative;. It may be causing part of the problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜