开发者

css problem pushing image down

I have a text paragraph above an image. When the paragraph grows and gains height, it pushes the image below down. How can i make it so that if the paragraph grows in height, the image below still retains its original position?

Added code:

img.alertIcon {
    margin: 85px 0 0 15px;
    float: right;
    vertical-align: middle;
    cursor: pointer;
    visibility: visible;
    clear: all;
}

#rightMain p {
    width: 350px;
    height: 100px;
    background-color: #f7f7f7;
    border-color: #ccc;
    border-width: 1px;
    border-style: solid;
    float: left;
    padding: 7px;
    font-开发者_如何学运维size: 14px;
    margin: 0 0 10px 0;
}


Sorry if I misunderstand what you're wanting, but maybe make your image have a fixed position. CSS position: fixed.

If you could post up an example that'd help as well.


You can try this one position:fixed; and if it is backgroundbackground-position: center bottom;


I think the best way will be to have the image float.

if the image is inside the paragraph simply add the float: left or float:right to the image so the image will stay in the same spot

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜