Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2005, 05:55 PM
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default centered floating div

I've got a quick question. I need to make a div that holds a swf file (with a transparent background) of the site's navigation. This navigation has a drop down menu, so it's supposed to cover part of the site. How do I overlap a div, centered on the page? Right now I've got: margin-left: auto;
    margin-right: auto;
    width:111px;
    height:72px;
    z-index:1;

to keep it centered, but I can't get it to overlap (by about 100 pixels).
 
Old January 1st, 2006, 09:37 AM
Registered User
 
Join Date: Jan 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alpinebill
Default

I would like to see more of the page to try to figure this out, I will try to reproduce it but hard without the exact flash file. One thing I am thinking of is to use a layer to encompass the flash file navigation instead. A simple table might work also. Why are you using div, are you using CSS for other parts of the div? Don't get me wrong I am all for using div wherever possible for the functionality but you may need a work around.
Bill

 
Old January 2nd, 2006, 09:49 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You need to add position: relative; or position: absolute; to get layering.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Firefox with table in centered page Europom CSS Cascading Style Sheets 2 March 12th, 2008 07:43 AM
Floating toolbar in WPF mani85 C# 0 August 6th, 2007 03:37 AM
div within a div and inherting the height brettdavis4 CSS Cascading Style Sheets 1 January 23rd, 2007 09:59 AM
Question about "floating div" JavaScript ks@millershea.com Javascript 0 April 17th, 2005 12:19 PM
css: fixed box totally centered Ê cat CSS Cascading Style Sheets 2 April 6th, 2005 08:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.