Yes now it came to me … many thanks Dan and Mary Catherine J


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Kaufman
Sent: Tuesday, October 03, 2006 4:52 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] css - a little off topic

 

Dusty,

 

Mary Catherine is right about adding to the CSS definition text-align: center;  (I was a little too quick in my reply)

 

#MyDiv

            {

margin-left: auto;
margin-right: auto;

}

 

Body

            {

text-align: center;

}

           

 

 

In general remember Google is your friend.  Just Google for CSS Center

 

Next, remember you can always View/Page Source for any web page.  You see a site that uses CSS, view the page source, if the style sheet is “linked” just copy the path, it will be in the <head> section, paste this back into your browser and you’ll be looking at their CSS for that page/site.  Study it to see how they positioned and styled elements, etc.

 

The biggest headache you’ll have is with IE. The problem here is IE often follows its own rules and not strict W3C guidelines. So you’ll do a page, developing with IE and think GREAT it works, only to see the site with Netscape or Firefox and it has blown up.  This has been my personal nemesis.  Until I SWITCHED TO FIREFOX.  It really is a better browser.  Now I develop my CSS using Firefox and then “tweak” it to work with IE’s quirks.

 

Good luck,

 

Dan Kaufman

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 1:12 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] css - a little off topic

 


I believe that you have to use margin: auto (or at least right and left) for it to play nice in IE.  You may also have to put a container around your div with text-align:center.  Or you can add that to your BODY tag. (I'm a little rusty on this myself)

mcg

Dusty Hale <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

10/03/2006 03:59 PM

Please respond to
discussion@acfug.org

To

discussion@acfug.org

cc

 

Subject

[ACFUG Discuss] css - a little off topic

 

 

 




Does anyone know how to center a div using css? I should know this and maybe just forgot. Google search only produces reference to the text-align property. I want to center the box on the page not the content inside the box. For example
 
<div id=”mydiv”>
 
Hello World
 
</div>
 
-----------

/* css code */
 
#mydiv {  What goes here to make the div box centered on the page.  }
 
 
 
Many thanks,
 
Dusty
 


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-------------------------------------------------------------

Reply via email to