Jump to content

image centering


gosu^

Recommended Posts

hey i got an image which i want to be the head but i want it just to kind of float in the middle of the page at the top. im struggling not to use tables to do this (nub) and was wandering if someone could help with some css way of doing it? much appreciated

Link to comment
Share on other sites

Well if it is a header and just 'floats' on top of the page in the center then use this.

<div style="width:100%;text-align:center"><img src="yourimage" alt="" /></div>

make sure this code is not placed in another tags/containers or it will not center properly.

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...