View Full Version : about Opacity

05-12-2011, 06:19 PM

Please have a look at this http://dontdare.50webs.com/template_4.html

I plan to set a low opacity on the background of my div but whatever I insert to the container of opacity also became less opacity.

like the sample link above, the logo and navigation cant read because of the opacity..

+ I want to center my navigation.

please tell me your solution. Thanks for advance.

05-13-2011, 01:04 AM
Opacity is, unfortunately, inherited by child elements. One solution (although not ideal) is to take the child elements out of the div and position them absolutely so that they can be moved on top of the div which has the opacity.

Some have suggested using a semi-transparent .png image as the background to the div, but this might still require a hack to persuade IE to show the .png correctly.

To centre your nav you could remove position:absolute and bottom:0 for the nav. But you'll then need to either increase the height of the top div, or reduce the margin for the h5/logo, so that the nav is kept within the top div.

05-13-2011, 03:36 AM
+ I want to center my navigation.

I posted a demo on centering menus in this thread (http://www.codingforums.com/showthread.php?p=1089517&highlight=centering#post1089517) (post 7)