...

View Full Version : Can't get absolute pos to work



bigbadroo
02-26-2008, 06:30 AM
Hi guys

In an effort to have a div with a semi transparent background, I have made two divs - one with the transparency, and another to place over the top for my content.

I can't get my overlay div to position correctly - it seems that ie and FF start off placing the div from different positions.

The page is at www.popbeatblues.com.au/rw/artist_1.php

Also, making the overlay have an absolute position has chnaged the appearance of it's content divs too.

Any ideas what I'm doing wrong?

Cheers

Shaun

_Aerospace_Eng_
02-26-2008, 07:04 AM
A correct url would be the first thing. I get a server not found on that url.

bigbadroo
02-26-2008, 07:25 AM
He he - all fixed now Aerospace - www.popbeatblues.com.au/rw/artist_1.php

abduraooft
02-26-2008, 07:35 AM
Absolutely positioned elements don't need a float. You may have to set right/left and top/bottom values.
BTW, always place absolutely positioned elements inside a relatively positioned container.

bigbadroo
02-26-2008, 08:12 AM
Thanks for the tips guys. I tried them, but the DIV is still in a different postion in IE and FF. It takes it's postion from the DIV "middle" in FF, but after the DIV "menu" in IE.

Any other thoughts on how to fix it?

My aim is just to have a div with a semi-transparent background, but not transparent contents. I could do it in photoshop, but I want to master just using DIVs with transparent backgrounds, so as not to have to worry about aligning images.

Cheers

S

_Aerospace_Eng_
02-26-2008, 05:50 PM
You've already been given the solution. You need to set the top and left values in the CSS for the element that is position:absolute. Also if you don't need to make something position:relative; then don't, it can cause bugs in IE6.

bigbadroo
02-27-2008, 01:58 AM
Ahh - when in doubt, follow the instructions :thumbsup: I thought youi guys were being general - didn't realise there are Top and Left attributes you can change.

Thanks heaps.

Shaun



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum