Need help floating div over image

I am trying to float the top grey menu on this page over the blue header graphic. I have the topmenu div set to float right but it only will display above or below the header graphic. any ideas?

http://tampabobby.com/landing/locations.html

thanks,
bobby
LVL 6
ob1_Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EnclavetCommented:
Floating a div will only do what it says "float" meaning if there is empty space on the right it will move to the right.

There are several ways you can handle this.

You can set the div to position absolutely over the image:

<div style="position: absolute; left: 20px; top: 160px;">

Play with the left and top until the div is exactly where you want it. Only problem with this is with issues of resizing the page or when you use different browsers, it might be displayed differently from what you want it to look like.

You can also use another position setting called relative.

Try setting the div menu that is floated right to:
position: relative;
left: 20px

This will move the menu that is floated right 20px to the left and over the graphic.
0
ob1_Author Commented:
how about this: http://tampabobby.com/landing/locations.html
does this look right or do you think i should incorporate the grey menu into the header area?
0
ob1_Author Commented:
i tried position: relative, left 20px but it still displays @ top or bottom. i don't think absolute positioning would be good. let me know if you have any other ideas.
 
 
 
thanks,
bobby
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

s8webCommented:
Try negative margin:

#topmenu{margin-top:-30px;} /*Adjust to taste*/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
s8webCommented:
BTW, it looks like you forgot to close your container div <div id="page-container">
0
EnclavetCommented:
I am attaching your site with the grey bar over the blue header image.

This is what I changed:

Under location.html:
I moved the <div id="topmenu"> to be inside the <div id="header">

Then in master.css:
I added to the topmenu class:
position: relative;
top: 20px;
left: -1px;

ExpertsExchange.zip
0
ob1_Author Commented:
Thanks Enclavet I will take a look at that. I tried the negative top-margin and that seems to work thank you!
Could you all please take a look at this and let me know if it looks ok: http://tampabobby.com/landing/locations.html
 
thanks,
bobby
0
EnclavetCommented:
Looks perfect in Firefox and IE8.
0
s8webCommented:
Looks good in Safari(pc) too.
0
ob1_Author Commented:
thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.