| | |
|
|
|
Center using CSS? |
| message from Web Office Juan on 16 Jul 2004 |
How can I center the two selectors (#banner, #content) of my web page using only css?
|
| jojo replied to Web Office Juan on 17 Jul 2004 |
Hi
body{
text-align: center; <-- forces IE 5.x pc to center the wrapper
}
#wrapper{
position: relative;
text-align: left; <-- realigns the text after above hack
margin: 0 auto; <-- centers the div on the page
}
then position your #banner and #content within the wrapper.
|
| whatalotofrubbish replied to Web Office Juan on 16 Jul 2004 |
Try this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.centre {
text-align: center;
|
| Murray *TMM* replied to whatalotofrubbish on 16 Jul 2004 |
That *IS* a load of rubbish! 8)
|
|
Archived message: Center using CSS? (Macromedia Dreamweaver Web Design)