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.

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.

i see so just set top_login to postion of relative

Glad to see that worked for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.