HighDots Forums  

Layers and Centering

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Layers and Centering in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Anthony LeBaron
 
Posts: n/a

Default Layers and Centering - 11-29-2004 , 11:09 AM






I'd kinda like to develop a site using layers, but also allowing center
justification.
I'd thought that I could somehow tweak the layer position using a math
function, based on the current browser width and the site width,
Anyone pursued this? Is there an easier way, perhaps, using CSS?

--
Anthony LeBaron
Senior Designer - Interactive
Interbrand
284 King Street East
Toronto, ON M5A 1K4

416 366 7100



Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Layers and Centering - 11-29-2004 , 11:32 AM






Anthony:

Using "LAYERS" to build a website is usually a bad approach.

Nevertheless, you can center them with CSS methods -

Here is a good demonstration -

http://www.roast-horse.com/tutorials/_tutorials/css_centered_content/index.html

And here is some code -

(inline styles used for clarity)

STYLESHEET -
body { text-align:center; } /* for IE5/IE5.5 */
#wrapper { text-align:left; }

BODY -
<div id="wrapper" style="width:760px; top:0; margin:0 auto;
position:relative;">
<div id="layer1" style="width:200px; top: 25px; left:140px;
position:absolute;">blah</div>
<div id="layer2" style="width:180px; top: 136px; left:23px;
position:absolute;">blah</div>
</div>

Try that - an outer relatively positioned division with a width and auto
left and right margins. All interior AP divisions will be centered, yet
retain the
same relative positioning.


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
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
==================

"Anthony LeBaron" <user (AT) macromediaforums (DOT) com> wrote

Quote:
I'd kinda like to develop a site using layers, but also allowing center
justification.
I'd thought that I could somehow tweak the layer position using a math
function, based on the current browser width and the site width,
Anyone pursued this? Is there an easier way, perhaps, using CSS?

--
Anthony LeBaron
Senior Designer - Interactive
Interbrand
284 King Street East
Toronto, ON M5A 1K4

416 366 7100




Reply With Quote
  #3  
Old   
Alexandro Colorado
 
Posts: n/a

Default Re: Layers and Centering - 11-30-2004 , 02:56 AM



On Mon, 29 Nov 2004 11:09:31 -0500, Anthony LeBaron
<user (AT) macromediaforums (DOT) com> wrote:

Quote:
I'd kinda like to develop a site using layers, but also allowing center
justification.
I'd thought that I could somehow tweak the layer position using a math
function, based on the current browser width and the site width,
Anyone pursued this? Is there an easier way, perhaps, using CSS?

By centering you mean vertical center or horizontal centered or both.
Anyway to acomplish this just use the parameters 20% on each side and will
make your layer about 60% taked from the middle of the browser work area.

--
Alexandro Colorado
------------------------------
Support Engineer
InterAKT Online
http://www.interaktonline.com
Tel: 40(21) 312.5312


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Layers and Centering - 11-30-2004 , 06:25 AM



That's a poor solution, in my opinion.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
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
==================

"Alexandro Colorado" <acolorado (AT) interaktonline (DOT) com> wrote

Quote:
On Mon, 29 Nov 2004 11:09:31 -0500, Anthony LeBaron
user (AT) macromediaforums (DOT) com> wrote:

I'd kinda like to develop a site using layers, but also allowing center
justification.
I'd thought that I could somehow tweak the layer position using a math
function, based on the current browser width and the site width,
Anyone pursued this? Is there an easier way, perhaps, using CSS?


By centering you mean vertical center or horizontal centered or both.
Anyway to acomplish this just use the parameters 20% on each side and will
make your layer about 60% taked from the middle of the browser work area.

--
Alexandro Colorado
------------------------------
Support Engineer
InterAKT Online
http://www.interaktonline.com
Tel: 40(21) 312.5312



Reply With Quote
  #5  
Old   
Joe {RoastHorse}
 
Posts: n/a

Default Re: Layers and Centering - 11-30-2004 , 08:29 AM



i think it's a fine solution if this is what was meant:

body {
margin: 30px 20%;
}

- flexible centred content :0)


joe





Murray *TMM* wrote:
Quote:
That's a poor solution, in my opinion.


Reply With Quote
  #6  
Old   
Anthony LeBaron
 
Posts: n/a

Default Re: Layers and Centering - 12-01-2004 , 04:49 PM



Thanks for your reply. You've answered my question exactly.
But can you tell me why 'Layers' have fallen out of favor?

"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote

Quote:
Anthony:

Using "LAYERS" to build a website is usually a bad approach.

Nevertheless, you can center them with CSS methods -

Here is a good demonstration -

http://www.roast-horse.com/tutorials/_tutorials/css_centered_content/index.html

And here is some code -

(inline styles used for clarity)

STYLESHEET -
body { text-align:center; } /* for IE5/IE5.5 */
#wrapper { text-align:left; }

BODY -
div id="wrapper" style="width:760px; top:0; margin:0 auto;
position:relative;"
div id="layer1" style="width:200px; top: 25px; left:140px;
position:absolute;">blah</div
div id="layer2" style="width:180px; top: 136px; left:23px;
position:absolute;">blah</div
/div

Try that - an outer relatively positioned division with a width and auto
left and right margins. All interior AP divisions will be centered, yet
retain the
same relative positioning.


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
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
==================

"Anthony LeBaron" <user (AT) macromediaforums (DOT) com> wrote in message
news:cofhjn$gm5$1 (AT) forums (DOT) macromedia.com...
I'd kinda like to develop a site using layers, but also allowing center
justification.
I'd thought that I could somehow tweak the layer position using a math
function, based on the current browser width and the site width,
Anyone pursued this? Is there an easier way, perhaps, using CSS?

--
Anthony LeBaron
Senior Designer - Interactive
Interbrand
284 King Street East
Toronto, ON M5A 1K4

416 366 7100






Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Layers and Centering - 12-01-2004 , 06:24 PM



They haven't. But users of Layers have. 8)

Layers are inline, absolutely positioned, div tags. Using them as a primary
layout method is troublesome.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
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
==================

"Anthony LeBaron" <user (AT) macromediaforums (DOT) com> wrote

Quote:
Thanks for your reply. You've answered my question exactly.
But can you tell me why 'Layers' have fallen out of favor?

"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in message
news:cofiun$idc$1 (AT) forums (DOT) macromedia.com...
Anthony:

Using "LAYERS" to build a website is usually a bad approach.

Nevertheless, you can center them with CSS methods -

Here is a good demonstration -

http://www.roast-horse.com/tutorials/_tutorials/css_centered_content/index.html

And here is some code -

(inline styles used for clarity)

STYLESHEET -
body { text-align:center; } /* for IE5/IE5.5 */
#wrapper { text-align:left; }

BODY -
div id="wrapper" style="width:760px; top:0; margin:0 auto;
position:relative;"
div id="layer1" style="width:200px; top: 25px; left:140px;
position:absolute;">blah</div
div id="layer2" style="width:180px; top: 136px; left:23px;
position:absolute;">blah</div
/div

Try that - an outer relatively positioned division with a width and auto
left and right margins. All interior AP divisions will be centered, yet
retain the
same relative positioning.


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
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
==================

"Anthony LeBaron" <user (AT) macromediaforums (DOT) com> wrote in message
news:cofhjn$gm5$1 (AT) forums (DOT) macromedia.com...
I'd kinda like to develop a site using layers, but also allowing center
justification.
I'd thought that I could somehow tweak the layer position using a math
function, based on the current browser width and the site width,
Anyone pursued this? Is there an easier way, perhaps, using CSS?

--
Anthony LeBaron
Senior Designer - Interactive
Interbrand
284 King Street East
Toronto, ON M5A 1K4

416 366 7100








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.