The Flash and PHP Bible has been released! The book can be found on Amazon or wherever fine books are sold in your area. This book explains the process of working with PHP in Flash, while creating real world examples that you can actually learn something from.
The Flash and PHP Bible has a dedicated forum for support and comments.
Center your site using CSS and drop the "center" tag.
Here is the CSS we will use
#wrap {
width: 760px;
margin: 0px auto 0px auto; /* top, right, bottom, left */
padding: 10px;
border: 1px solid #000;
background-color: #eee;
}
This is the HTML to use on your site
<div id="wrap"> <!-- YOUR SITE CONTENT GOES HERE --> </div>
The "wrap" or box will be horizontally centered in the browser. Now in modern browsers you could stop here but we don't want to forget about the others that have a lack of CSS2 support.
A great article addresses this fact so I will link you to that now. http://bluerobot.com/web/css/center1.html
That is all it takes to center your designs in most of the browsers.
Next time we will tackle relative font sizes using percents instead of pixels.
|
Jer Sun Jul 30, 2006 3:11 pm
You may also want to include
body { padding:0; margin:0; text-align: center; } This will clear the various margins and padding that different browsers use by defult. |
|
Alex McKee Fri Aug 4, 2006 8:55 am
You can condense this wrap code somewhat:
#wrap { width: 760px; margin: 0px auto; padding: 10px; border: 1px solid #000; background: #eee; } |
|
Busbu SEO Challenge Sun Aug 3, 2008 12:36 am
Sometimes the code above doesn't work in other browser. You need to put a text-align: center to make it work.
|
©2004 - 2008 scriptplayground | Privacy Policy | Legal
Validate Site: XHTML CSS | Designed by: mkeefeDESIGN |