Jump to content

Center with <center>


littlegreiger

Recommended Posts

You're probably using a Strict DTD in which case presentation elements are unvalid. Give a class or ID to a div and center that div instead.

.class {   text-align: center;}or#id {   text-align: center;}

<div class="class"></div> or <div id="id"></div>A certain ID can only be used once in a page and should be used on medium-large chunks in your page. Classes are for multiple lesser-important elements on your page.

Link to comment
Share on other sites

u can also write so :<center> <p>Im in center</p></center>But it strange, in <img> for eample, if im writiing 'valign="absmiddle"' - it works, but if im writing - 'style="vertical-align:absmiddle"' - it doesnt work. I meant, the picture isnt in the middle.

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