0

i want to move image 5px up so it is equal to text.

<div id='top_login'>
        <h1>InSecure Checkout</h1> <img id="lock_img" src="IMAGE/lock.png" width="25px" height="25px"/>
</div>

problem with this code this that it prints

**Insecure checkout**
                  |image|

i fixed this problem by using css:

position:absolute;
    right:300px;
    top:240px;

but that the problem is that when i resize the window. my postion are missed up.
is there a way to do this with out missed it when i resize window.

Edited by hwoarang69

2
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by JorgeM
0

You can still use absolute positioning, but if you want to position it within the Div, you must set the parent element (in this case "top_login") to have a position of relative. If you dont, the image's abosolute positioning will be that of the body element.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.