HighDots Forums  

How to center a layer

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss How to center a layer in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: How to center a layer - 07-18-2004 , 08:31 AM






<frameset rows="100%,*" framespacing="0" frameborder="0">
<frame name="site" src="main.html" frameborder="0" scrolling="No" noresize
marginwidth="0" marginheight="0">
<frame name="blank" src="blank.html" frameborder="0" scrolling="No" noresize
marginwidth="0" marginheight="0">
</frameset>

Ewww.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(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
==================

"GregSW18" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi Murray,

Sorry to bother you again with this issue - but i'd really like to learn
how
to do this centered layer or table thing.

What I want to achieve is the centered 'window' as on the Cartier site.

http://www.cartier.com/us/index.html

When you reduce the browser window - the rectangle adjusts to stay
centered -
both HORIZONTALLY and VERTICALLY.

Is it done with layers? I hope so - because nested tables are a pain.

Thanks,

- Greg




Reply With Quote
  #12  
Old   
Thierry Koblentz
 
Posts: n/a

Default Re: How to center a layer - 07-18-2004 , 08:55 AM






That's not gonna do much

Thierry

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

Quote:
frameset rows="100%,*" framespacing="0" frameborder="0"
frame name="site" src="main.html" frameborder="0" scrolling="No" noresize
marginwidth="0" marginheight="0"
frame name="blank" src="blank.html" frameborder="0" scrolling="No"
noresize
marginwidth="0" marginheight="0"
/frameset

Ewww.



Reply With Quote
  #13  
Old   
Thierry Koblentz
 
Posts: n/a

Default Re: How to center a layer - 07-18-2004 , 09:02 AM



I'm not Murray but I'll try to help you.

The Cartier site is a Flash movie in a table. See below:
<body bgcolor="#3D0101" leftmargin="0" topmargin="0" rightmargin="0"
bottommargin="0" marginwidth="0" marginheight="0"><CENTER>
<table height=95% cellpadding=0 cellspacing=0 border=0><TR><TD><table
cellpadding=0 cellspacing=0 border=0><TR><TD valign=bottom><img
src="html/gif/copyrights.gif" alt="" width="8" height="76"
border="0"><br><img src="html/gif/pix.gif" alt="" width="1" height="7"
border="0"></TD><TD align=center><OBJECT
classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=5,0,0,0" WIDTH=779 HEIGHT=421><PARAM NAME=movie VALUE="index.swf">
<PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#3D0101> <EMBED
src="index.swf" quality=high bgcolor=#3D0101 WIDTH=779 HEIGHT=421
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash"></EMBED></OBJECT></TD></TR></TABLE></TD></TR></TABLE
Quote:
/BODY

Not very clean BTW.

If you don't care about using frames go to www.ProjectSeven.com and look for
something called "letterbox" frameset

HTH,
Thierry

"GregSW18" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi Murray,

Sorry to bother you again with this issue - but i'd really like to learn
how
to do this centered layer or table thing.

What I want to achieve is the centered 'window' as on the Cartier site.

http://www.cartier.com/us/index.html

When you reduce the browser window - the rectangle adjusts to stay
centered -
both HORIZONTALLY and VERTICALLY.

Is it done with layers? I hope so - because nested tables are a pain.

Thanks,

- Greg




Reply With Quote
  #14  
Old   
GregSW18
 
Posts: n/a

Default Re: How to center a layer - 07-18-2004 , 09:25 AM



Could you perhaps provide an alternaive?

Thanks,

- Greg

Reply With Quote
  #15  
Old   
Thierry Koblentz
 
Posts: n/a

Default Re: How to center a layer - 07-18-2004 , 10:35 AM



Quote:
Could you perhaps provide an alternaive?
I've done that already. Can't you see my post about the letterbox frameset?

Thierry

"GregSW18" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Could you perhaps provide an alternaive?

Thanks,

- Greg



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

Default Re: How to center a layer - 07-19-2004 , 07:51 AM



Thierry:

It's the code from the linked page posted originally. It's not what I
proposed.

The OP was saying he hoped that the page was centering layers. I posted the
page's frameset code.

--
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
==================

"Thierry Koblentz" <thierry (AT) 212Utah (DOT) invalid> wrote

Quote:
That's not gonna do much

Thierry

"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in message
news:cddqj3$nb3$1 (AT) forums (DOT) macromedia.com...
frameset rows="100%,*" framespacing="0" frameborder="0"
frame name="site" src="main.html" frameborder="0" scrolling="No"
noresize
marginwidth="0" marginheight="0"
frame name="blank" src="blank.html" frameborder="0" scrolling="No"
noresize
marginwidth="0" marginheight="0"
/frameset

Ewww.





Reply With Quote
  #17  
Old   
Thierry Koblentz
 
Posts: n/a

Default Re: How to center a layer - 07-19-2004 , 10:33 AM



Hi Murray,
That page's frameset code doesn't center anything; it just creates 2 frames,
one being an "invisible blank".
That's why I replyed to your post, I didn't want the poster to try that code
and then turn in circles wondering why he couldn't make it work

Thierry

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

Quote:
Thierry:

It's the code from the linked page posted originally. It's not what I
proposed.

The OP was saying he hoped that the page was centering layers. I posted
the
page's frameset code.



Reply With Quote
  #18  
Old   
GregSW18
 
Posts: n/a

Default Re: How to center a layer - 07-19-2004 , 11:49 AM



I think I've solved it! All by my untechnical self!

Create a layer. Use css to position it 50% from the left, 50% from the top.

Nest a 2nd layer inside it.

I want my 'window' to be 750 wide and 440 high.

So I position this 2nd layer -375 from the 1st layer's left edge. And -220
from the 1st layer's top edge.

I seems to work a treat. It's perfectly positioned in the middle of the page.
And the 1st layer's relative positioning ensures that when I adjust the browser
window - the 2nd layer stays horizontally and vertically centered.

Thanks for all your help.

Please let me know if you can see any potential flaws in my solution.

- Greg


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

Default Re: How to center a layer - 07-19-2004 , 02:12 PM



I see a flaw.

Here's the right way to do it.

(inline styles used for clarity)

<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 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
==================

"GregSW18" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I think I've solved it! All by my untechnical self!

Create a layer. Use css to position it 50% from the left, 50% from the
top.

Nest a 2nd layer inside it.

I want my 'window' to be 750 wide and 440 high.

So I position this 2nd layer -375 from the 1st layer's left edge.
And -220
from the 1st layer's top edge.

I seems to work a treat. It's perfectly positioned in the middle of the
page.
And the 1st layer's relative positioning ensures that when I adjust the
browser
window - the 2nd layer stays horizontally and vertically centered.

Thanks for all your help.

Please let me know if you can see any potential flaws in my solution.

- Greg




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.