Jump to content

<div>


ownage

Recommended Posts

<span> is an in-line element and <div> is a block-level element. Use spans inside of div's.Tables are not designed to structure a page, although they do work for that. Do it however you want, but there are distinct advantages to div's and css. File size and speed of loading for one thing. Tables are bulkier and take longer to load. They are more difficult to modify.

Link to comment
Share on other sites

  • 1 year later...

A div is a block-level element by default, which stretches 100% width, so if you want to center it you'll need to reduce the width so that the div is smaller then it's container. Then you can use auto margins to center the div inside its container.<div style="width: 500px; margin: 0 auto;">

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