Reputation: 23
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;
}
Upvotes: 2
Views: 2858
Reputation: 43820
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
Upvotes: 0
Reputation: 22076
You can try this one position:fixed;
and if it is backgroundbackground-position: center bottom;
Upvotes: 0
Reputation: 975
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.
Upvotes: 1