HighDots Forums  

Layer Positioning problem

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Layer Positioning problem in the Macromedia Dreamweaver forum.



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

Default Layer Positioning problem - 09-20-2005 , 11:44 AM






as the core of my page, I'm using a table set to center, so that it stays in
the middle of the window no matter how you resize the browser. Inside the
table, I've got a DIV-type layer with content inside. Problem is that when I
resize the window, the layer doesn't move with the table under it. I've tried
"absolute", "relative" positioning...nothing works.

I can get it to work with an iFrame, however I prefer to use regular layers if
at all possible.

any ideas on how I can get the layer to stay locked to the position of the
table under it?

Thanks in advance for any help!


Reply With Quote
  #2  
Old   
-D
 
Posts: n/a

Default Re: Layer Positioning problem - 09-20-2005 , 11:58 AM






Instead of using a table for centering, try to use a div tag like so:
<div align="center" style ="position:relative;" >
stuff
</div>

I think this will allow you to position it inside of that div.




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

Default Re: Layer Positioning problem - 09-20-2005 , 12:14 PM



Can't work. This will only center align the contents of the div, not the
div itself.

Rule 1 - never put absolutely postioned element directly into a table cell.
Rule 2 - don't try to fix a problem by flailing the positioning value.
Rule 3 - post a link to the page with such problems - the answer is in the
code.

Can you do that, skyboysky?

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

"-D" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Instead of using a table for centering, try to use a div tag like so:
div align="center" style ="position:relative;"
stuff
/div

I think this will allow you to position it inside of that div.






Reply With Quote
  #4  
Old   
Stephanie Sullivan
 
Posts: n/a

Default Re: Layer Positioning problem - 09-20-2005 , 12:16 PM



On 9/20/05 11:58 AM, in article dgpbjl$5rm$1 (AT) forums (DOT) macromedia.com, "-D"
<webforumsuser (AT) macromedia (DOT) com> wrote:

Quote:
Instead of using a table for centering, try to use a div tag like so:
div align="center" style ="position:relative;"
stuff
/div

I think this will allow you to position it inside of that div.
That will allow positioning inside the div, but it won't center the div...

To center it, you'll need to set a width on the div as well as margin: 0
auto 0 auto; (or shorthand - margins: 0 auto...

For IE 5* compliance, you'll also need to set a text-align: center; on the
body selector (and change it back to text-align: left; if that's what you
want within the div)...

To sum it up:

<div id="holder">all your page content</div>

body {
text-align: center;
/*all your other values */
}

#holder {
width: 750px; /* or whatever you need */
margin: 0 auto;
text-align: left;
position: relative; /* only needed if you'll be using an absolutely
positioned element within this */
}

That should fix you.

Stephanie Sullivan
Community MX Partner :: http://www.communitymx.com/author.cfm?cid=1008
Team Macromedia for Dreamweaver :: http://tinyurl.com/6huw3
Co-Author .: "Macromedia Dreamweaver MX 2004 Magic" :. New Riders
VioletSky Design :: http://www.violetsky.net

"When one door of happiness closes, another opens; but often we look so long
at the closed door that we do not see the one which has been opened for us."
-- Helen Keller





Reply With Quote
  #5  
Old   
skyboysky
 
Posts: n/a

Default Re: Layer Positioning problem - 09-20-2005 , 12:28 PM



Thanks D,

a variation of what you suggested worked perfectly!!! Only weird thing is that
in DW, the layer is way off to the right of the window, while in the browser,
it's actually in the right place.

Thanks again,


Originally posted by: -D
Instead of using a table for centering, try to use a div tag like so:
<div align="center" style ="position:relative;" >
stuff
</div>

I think this will allow you to position it inside of that div.







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

Default Re: Layer Positioning problem - 09-20-2005 , 12:31 PM



This will not work....

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

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

Quote:
Thanks D,

a variation of what you suggested worked perfectly!!! Only weird thing is
that
in DW, the layer is way off to the right of the window, while in the
browser,
it's actually in the right place.

Thanks again,


Originally posted by: -D
Instead of using a table for centering, try to use a div tag like so:
div align="center" style ="position:relative;"
stuff
/div

I think this will allow you to position it inside of that div.









Reply With Quote
  #7  
Old   
skyboysky
 
Posts: n/a

Default Re: Layer Positioning problem - 09-21-2005 , 03:42 AM



Thanks Stephanie... your solution worked even better! Amazing.

Reply With Quote
  #8  
Old   
Alecto161
 
Posts: n/a

Default Re: Layer Positioning problem - 11-07-2005 , 07:29 PM



Originally posted by: Newsgroup User
On 9/20/05 11:58 AM, in article dgpbjl$5rm$1 (AT) forums (DOT) macromedia.com, "-D"
<webforumsuser (AT) macromedia (DOT) com> wrote:

Quote:
Instead of using a table for centering, try to use a div tag like so:
div align="center" style ="position:relative;"
stuff
/div

I think this will allow you to position it inside of that div.
That will allow positioning inside the div, but it won't center the div...

To center it, you'll need to set a width on the div as well as margin: 0
auto 0 auto; (or shorthand - margins: 0 auto...

For IE 5* compliance, you'll also need to set a text-align: center; on the
body selector (and change it back to text-align: left; if that's what you
want within the div)...

To sum it up:

<div id="holder">all your page content</div>

body {
text-align: center;
/*all your other values */
}

#holder {
width: 750px; /* or whatever you need */
margin: 0 auto;
text-align: left;
position: relative; /* only needed if you'll be using an absolutely
positioned element within this */
}

That should fix you.

Stephanie Sullivan
Community MX Partner :: http://www.violetsky.net

"When one door of happiness closes, another opens; but often we look so long
at the closed door that we do not see the one which has been opened for us."
-- Helen Keller






Can anyone translate that for someone who never touches the code and focuses
on graphical mode? (<--- DW Noob)




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.