Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: about Opacity

  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    138
    Thanks
    52
    Thanked 0 Times in 0 Posts

    about Opacity

    hello.

    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.

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #3
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    Quote Originally Posted by finoy_ako View Post
    + I want to center my navigation.
    I posted a demo on centering menus in this thread (post 7)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •