How do I center an object within a window?

Blocat How do I center an object within a window?

  • lundi 2 janvier 2012 03:12
     
     

    Hello,

    I'm a newbie with what is I'm sure a silly question but I have searched the forums ad the Net and Help (always waorhless), and I've got nowhere.

    I'm using MS Expressin Web Studio Pro 4; MS Windows 7 64 bit.

    I have a sandbox domain http://www.auxware.com which I have been pulishing a template, Small Business 2. You are welcome to view the website to see the issue!

    The Banner at the top and the large LOGO on the middle do not lign up on most screen, especially big screens. If you have a 15" laptop like it probably looks OK because I built it on that with a laptop.

    My problem is, I can click on the object, then click left or right justify ... but "center" does not work' Center is what I truly want in many, many instances.

    Can anyone please help me?

    Thanks, in advance, for your kind help!!!

    Best regards,

    JH


    Denny Joe Hatcher

Toutes les réponses

  • lundi 2 janvier 2012 03:32
     
     

    By the way, I currently have it positioned as well as it is by having a table with 3 columns and 1 row. The table ia narrowed in on both sides to simulate centering the object. the logo on the left is left justified. the typing on the right is right justified.

    -JH


    Denny Joe Hatcher
  • mercredi 4 janvier 2012 03:47
     
      A du code

    Hello Denny--you will get quicker aid in the Expression Web forum versus this one. Yeah, EW is part of the Expression Studio...but for specific aid concerning EW, it's best to post in the EW forum:

    http://social.expression.microsoft.com/Forums/en-US/web/threads

    First, many thanks for posting a URL. It is an absolutely needed thing for getting the most efficient help.

    Second. Your site is fully liquid. That is, there is no max-width or width property in the CSS. So in your style2.css, your body style is:

    body {
    	color: #000;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: small;
    	font-style: normal;
    	background-color: #fff;
    }

    You should limit the width to 960 to perhaps 1024 pixels. Else on large monitors people will be reading across the page for what seems like a mile.

    Third. You site makes extensive use of tables for the layout. You should be using CSS for layout. Tables were a means to an end once upon a time. But standards change. In this case, about a decade ago. In general, avoid the use of tables.

    Fourth...use divs controlled by CSS to position elements, such as the header region.

    The common theme above is to use CSS methods for laying out your site. You will need to learn a few things about CSS if you do not know them. You can review the resources in the 2nd post in the forum I pointed you to entitled: Forum FAQ and Guidelines - Start Here. Scroll down through it and you will find a section entitled: Learning Resources and Reference Sites. In that section, the link to w3schools is a great resource for answering many questions as regards the html and css you really need to know in order to use a tool such as EW (or DreamWeaver for that matter).

    Take care, Mike