![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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? |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
That's a poor solution, in my opinion. |
#6
| |||
| |||
|
|
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 |
#7
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |