HighDots Forums  

Nest a layer in a table or cell

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Nest a layer in a table or cell in the Macromedia Dreamweaver forum.



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

Default Nest a layer in a table or cell - 11-04-2005 , 01:06 AM






I'm working on a page that centers in the viewer's window, which as you can
imagine works great using tables, and I'd like to use layers, but the fixed
positioning of layers produces bad results. Is there a way to 'nest' a layer
within a table or cell so that its position will move with the table/cell?
Thanks a heap.


Reply With Quote
  #2  
Old   
T.Pastrana - 4Level
 
Posts: n/a

Default Re: Nest a layer in a table or cell - 11-04-2005 , 01:48 AM






You could change the positioning to relative instead of absolute.


--
Regards,
...Trent Pastrana
www.fourlevel.com
..





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

Quote:
I'm working on a page that centers in the viewer's window, which as you
can
imagine works great using tables, and I'd like to use layers, but the
fixed
positioning of layers produces bad results. Is there a way to 'nest' a
layer
within a table or cell so that its position will move with the table/cell?
Thanks a heap.




Reply With Quote
  #3  
Old   
skjc
 
Posts: n/a

Default Re: Nest a layer in a table or cell - 11-04-2005 , 06:01 AM



thanks for this it works fine but i noticed that if i change from absolute to
relative the layer disappears?

what i mean is that if you change to relative then the layer does not show
anymore in the layers panel - switch back to absolute and the layer is back in
the panel again?

any ideas


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

Default Re: Nest a layer in a table or cell - 11-04-2005 , 08:15 AM



Quote:
what i mean is that if you change to relative then the layer does not show
anymore in the layers panel - switch back to absolute and the layer is
back in
the panel again?
That's correct. In DW parlance, a "layer" is any element that is absolutely
positioned. By changing this <div> from position:absolute to
position:relative, you have made it no longer be a layer.

Personally, I hate having even relatively positioned elements in table
cells. Here's another (and better) solution (in my opinion) that will allow
you to continue working with layers -

So - take the layer OUT OF THE TABLE, paste it back in immediately above
</body>, and position it as desired on the page.

Change this -

</head>

to this -

<style type="text/css">
<!--
body { text-align:center; color:#CCC; }
#wrapper { text-align:left; width:720px; margin:0 auto;position:relative; }
-->
</style>
</head>

change this -

<body ...>

to this -

<body ...>
<div id="wrapper">

and this -

</body>

to this -

</div><!-- /wrapper -->
</body>

and see if that helps.


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

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

Quote:
thanks for this it works fine but i noticed that if i change from absolute
to
relative the layer disappears?

what i mean is that if you change to relative then the layer does not show
anymore in the layers panel - switch back to absolute and the layer is
back in
the panel again?

any ideas




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.