Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Opacity problem with sub div

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #163148
    jasonxxx102
    Participant

    So I basically have 2 divs and they are setup like this

    <div id="header">
    <div id="navbar">
    </div>
    </div>
    

    This is the CSS for the header and navbar:

    #header
    {
    padding: 0px;
    opacity: 0.25;
    background-color: #dcddd8;
    height: 100px;
    width: auto;
    vertical-align: middle;
    }
    #navbar {
      width: auto;
      height: auto;
      border: 1px solid #b9121b;
      vertical-align: middle;
      background: #d74b4b;
      position: relative;
      top: 35px;
    }
    

    I want to know why all the content in my navbar is being affected by the opacity of the header. Can anyone help me fix this error. (I want the background of the header to be opaque but I want the navbar to retain its color)

    #163154
    jasonxxx102
    Participant

    Thank you!!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.