Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Align two layers to center? Help!

Status
Not open for further replies.

ucsbgaucho

Technical User
Mar 24, 2005
3
US
I've got a website design where I have two layers that I want centered on the screen, no matter what size monitor someone has. I've used the <div> thing for centering html content just fine, but it doesn't seem to do anything with layers. Here's what I have:

Layer 1: Navigation menu, 900px x 130px... drop down menu that needs to overlap the other layer, so when you roll over one menu item where your choices slide down, the choices show over the top of the other content

Layer 2: Normal content of site. Will be flash animation, or text, etc. Will change on each page.

I can't seem to get layer 1 aligned to the center with layer 2, and have layer 1 positioned just above layer 2 but overlapping, so when the menu bar is static, it rests on top of layer 2, but when you roll over a menu item, the drop-down part comes down over the other content.

Any help?
 
show your code

:--------------------------------------:
fugitive.gif


All around in my home town,
They tryin' to track me down...
 
This is the first time I got really frustrated with Dreamweaver8. I cannot place on autocenter the page that I am building using Layers. You can do it with 'tables' though by nesting pixel based table inside a percentage based table.

The problem here is that, Internet Explorer does not give the exact positions of certain items i.e. Flash files while Firefox works perfect.

With Layers, it seems to me that it is impossible. Spent a whole day for this. Tried converting layers to tables and even tried Layout mode.
 
Check this out:
<div align="center">
<p>
<div id="Layer1" style="width:500px; position:relative">
<p>ASFDFASDFASDFASDF</p>
<p>FASDFASDFASDF</p>
<p>AFASDFASDFA</p>
<p>SDFASDFASDFAS</p>
<p>DFASDFASDFAS</p>
</div>
</p>
</div>
 
page propoerties or adjust your css attached to body tag or use "main" or "center" layer concept as AM7555 shows.
All the best!

:--------------------------------------:
fugitive.gif


All around in my home town,
They tryin' to track me down...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top