The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> div layer positioning: absolute? relative?
Markasey
post Jul 9 2008, 06:42 PM
Post #1


Newbie
*

Group: Members
Posts: 10
Joined: 21-January 08
Member No.: 4,759



I'm having a hard time laying out a page here. I have the full table inside a #container div which is positioned: absolute.

Then a #nav layer using relative positioning. I could see that making it "0" position left was taking it to the left edge of the container-- which is where I wanted it.

My problem comes in when I try to add another layer for the page text. If I make it "relative" -- the #nav div disappears. If I make it absolute, I can still see the #nav layer but the positioning is all messed-up. Can't I have 2 layers positioned relatively within a container?

Here are my test files: http://www.markasey.com/ that is, of course, my index page and then if you click on "home" you'll see what happens if I made the #text layer "relative" -- no navigation bar (yet the code is there)

Sorry to be so long-winded -- I hope that makes sense and someone has some ideas for me. Thanks, Mark
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 9 2008, 07:49 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 7,207
Joined: 9-August 06
Member No.: 6



I think you misunderstand what 'position: relative' does. It positions the box with an offset relative to where it would be had it not been positioned. You could say you push it away from its orginal position.

QUOTE
Then a #nav layer using relative positioning. I could see that making it "0" position left was taking it to the left edge of the container-- which is where I wanted it.


Which means that's where it would have been anyway, had you done nothing.

If I follow your description you first had an AP box. AP takes it out of the "flow", it doesn't affect other content on the page. So when you add more content it will begin in the top left corner, just as if it had been alone on the page, only the AP box will be on top of it. Did that make any sense? blush.gif


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Markasey
post Jul 9 2008, 07:51 PM
Post #3


Newbie
*

Group: Members
Posts: 10
Joined: 21-January 08
Member No.: 4,759



Oh wow..now I'm really confused. So if I take out positioning altogether, it should stay where I position it in Dreamweaver?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 9 2008, 07:56 PM
Post #4


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 7,207
Joined: 9-August 06
Member No.: 6



Don't ask me about DW. I type. tongue.gif


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Markasey
post Jul 9 2008, 07:57 PM
Post #5


Newbie
*

Group: Members
Posts: 10
Joined: 21-January 08
Member No.: 4,759



that's what I meant-- type-- not DW smile.gif So how does the layer know where to sit if there's no positioning?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Markasey
post Jul 9 2008, 08:00 PM
Post #6


Newbie
*

Group: Members
Posts: 10
Joined: 21-January 08
Member No.: 4,759



Oh, re: AP box. DW ( which I do NOT use tongue.gif) just gave it that name. I had no idea the AP did something else. Maybe I'll just rename it and play with it without the AP.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 9 2008, 08:00 PM
Post #7


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 7,207
Joined: 9-August 06
Member No.: 6



It isn't a "layer" if it isn't positioned. As I understand it "layer" is DW talk for an (absolutely?) positioned element.


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 9 2008, 08:04 PM
Post #8


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 7,207
Joined: 9-August 06
Member No.: 6



QUOTE(Markasey @ Jul 10 2008, 03:00 AM) *

Oh, re: AP box. DW ( which I do NOT use tongue.gif) just gave it that name. I had no idea the AP did something else. Maybe I'll just rename it and play with it without the AP.


Definitely do. There's nothing wrong with AP, but you should know what you are doing and don't use it if it isn't needed. Don't use anything that isn't needed. tongue.gif

I have no experience with DW, but from what I see it favors AP as do all WYSIWYG editors. They aren't smart enough ti use it in a clever way, they just position everything relative the browser window's top left corner (in best case).


--------------------
“Never go to excess, but let moderation be your guide.”
– Cicero
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Markasey
post Jul 9 2008, 08:10 PM
Post #9


Newbie
*

Group: Members
Posts: 10
Joined: 21-January 08
Member No.: 4,759



QUOTE
They aren't smart enough ti use it in a clever way, they just position everything relative the browser window's top left corner (in best case).


Which makes no sense to me. Your site would look different on every computer, right? This is my problem. Well thanks for your help anyway. You have given me some ideas to play around with. I'll let you know how it goes. Maybe I'll teach you some DW tricks one day wink.gif haha
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st November 2009 - 07:42 AM