Question:

How do I align center in Dreamweaver?

by  |  earlier

0 LIKES UnLike

I want my page to align to the center of the user's screen, instead of off to the left where it is now. Please help! I have searched and found nothing! Thanks for any ideas.

 Tags:

   Report

4 ANSWERS


  1. The editor you use is pretty much irrelevant, just so long as you can get access to the stylesheets (and Dreamweaver lets you).

    http://dorward.me.uk/www/centre/ explains how.

    Avoid trying to centre the body element - some commonly used browsers (Internet Explorer) don't support it properly.


  2. Add this to your CSS:

    * { margin: 0; padding: 0; }

    body {

    background: #FFF;

    margin: 0 auto;

    }

    That 'auto-margins' it to the center of the page.

    The top part just resets every element to no margin and no padding.


  3. There are two kinds of elements: block-level, such as <div>,<h1>, and <table> and inline, such as <a>, <i>, <span>, or <u>

    It is actually not possible to center align an inline element by itself. You need to have it enclosed in block-level element.

    If we are talking about a block-level element, there are two methods of  align it center:

    set its style property to "text-align:center", which will center all elements WITHIN the element, or set its style property to "margin:auto 0", which will align the element itself center.

    You could also just wrap it in a <center> tag.

  4. Hello there,

    Well, I usually don't answer these questions, but thought I would as I do some Designing for our site here at work, http://www.dexknows.com.

    Anyways, if you aren't too familiar with CSS, you might want to try putting a table around all of you content and then centering that. It's fairly easy after you select the entire table, you should get an 'align' drop-down in the 'Properties' panel & then just select 'center'.

    Hope that helps you out!

    -Dex

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.