|
|
| judas2 2004-03-31, 11:30 am |
| How can i center a fixed width css-p construction in my page using DIVs? Do I have to insert all the DIVs in a table and center the table? :-(
| |
| Barry Pearson 2004-03-31, 11:31 am |
| judas2 wrote:
> How can i center a fixed width css-p construction in my page using
> DIVs? Do I have to insert all the DIVs in a table and center the
> table? :-(
You can insert them in a fixed-width div and centre the div. (Are you aware of
the trick needed to centre a div in IE 5?)
But, see my other response (to Osgood). I think you could get a better result
than you did if you:
- Removed both the width & float from "centro", and let it flow into place
normally. (It would have to be placed *after* the sidebars in the HTML).
- Perhaps give it left & right margins of 33% to try to make it act like a
column even below the sidebars.
And, in case you want a flexible layout but with a *maximum* width, you could
use a single cell table to hold all the content. Give the cell (not the table)
a width (not a max-width), and see if you like the result.
--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
| |
| Osgood 2004-03-31, 11:31 am |
| judas2 wrote:
> How can i center a fixed width css-p construction in my page using DIVs? Do I have to insert all the DIVs in a table and center the table? :-(
<style type="text/css">
body {
text-align: center;
margin: 0 auto;
}
#myDiv {
width: 600px;
background-color: #ab1;
font: 12px arial;
color: #000;
}
</style>
<body>
<div id="myDiv">This is a centered</div>
</body>
| |
| Osgood 2004-03-31, 11:31 am |
| Osgood wrote:
> <style type="text/css">
> body {
> text-align: center;
> margin: 0 auto;
> }
>
> #myDiv {
> width: 600px;
> background-color: #ab1;
> font: 12px arial;
> color: #000;
> }
> </style>
The margin: 0 auto; should go in the #myDiv css style not the body style.
| |
|
|
| Osgood 2004-03-31, 11:31 am |
| Barry Pearson wrote:
> But, see my other response (to Osgood). I think you could get a better result
> than you did if you:
I didnt see your response Barry, which thread was it. I lose track of
this stuff easily.
| |
| Osgood 2004-03-31, 11:33 am |
| Barry Pearson wrote:
> Osgood wrote:
>
>
>
> Too busy talking to yourself - again! (But only a response this time, not a
> full dialogue).
>
> DIVs tutorials.
>
lol yeah I picked it up, thanks.
| |
|
|
|
|
| judas2 2004-03-31, 11:38 am |
| margin: 0 auto; in the wrapper? easy when you know it!!!
Thanks a lot to everybody
Special thanks to Al Sparber
| |
| Murray *TMM* 2004-03-31, 1:33 pm |
| Yes - I agree with both! 8)
However, on reexamination, Al's illustration is failing.
collapse additonal content
I hear absolutely no additonal content collapsing (what is that, anyhow?).
;-)
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"judas2" <webforumsuser@macromedia.com> wrote in message
news:c4ens6$hi7$1@forums.macromedia.com...
> margin: 0 auto; in the wrapper? easy when you know it!!!
> Thanks a lot to everybody
> Special thanks to Al Sparber
| |
| Al Sparber- PVII 2004-03-31, 1:34 pm |
| Murray *TMM* wrote:
> Yes - I agree with both! 8)
>
> However, on reexamination, Al's illustration is failing.
>
> collapse additonal content
>
> I hear absolutely no additonal content collapsing (what is that,
> anyhow?). ;-)
Turn your speakers up and look underneath your monitor.
--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Extensions - DesignPacks - Tutorials - Books
---------------------------------------------------------------------
The PVII Newsgroup | news://forums.projectseven.com/pviiwebdev
The CSS Newsgroup | news://forums.projectseven.com/css
---------------------------------------------------------------------
| |
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |