Jump to content

Align Image with Title Text


travd93

Recommended Posts

Linked is my website that I have been working on and off for awhile.

As you can see the image is not inline with the title, I realise this is probably a jquery issue that I am just not getting.

 

Can anyone advise me on the correct tag or class I should be applying to have it inline with the title.

 

Thank you

 

http://mrt.guardian1.com.au:57005/test/index.php

Link to comment
Share on other sites

The image (I assume you're referring to the shield on the top left corner) has an absolute position. Because of that, it's going to the exact pixel position on the page that you told it to.

 

You can try changing the top and left properties to move it around to a better position, or you can remove the absolute positioning and use other techniques.

 

The <br> tag in your source code is causing there to be space above your <h1> element, you would have a lot more control over that if you removed it and gave a top margin to the <h1> instead.

Link to comment
Share on other sites

Thanks, I didnt want to use the <br> either but I just don't know enough to think of something better, but now I do haha thanks.

Margins are my savior

<div data-role="header" data-id="header" data-position="fixed"><img src="img/logo.gif" alt="logo" class="ui-btn-left" style="width:2.5em; margin-top:.3cm; margin-left:.3cm;"><h1 id="title" style="margin-top: .3cm;" ></h1></div>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...