-1

I tried to make the research online but couldn't find anything. I am trying to change my menu to make it go behind my background image like on this website: https://www.paypal.com/ca/webapps/mpp/merchant

How can I change my css to apply it to my menu?

.holder{
width:960px;
margin:0 auto;
overflow:hidden;
position:relative;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
#nav{
background:#fefefe;
padding:15px;
}

#nav .clearfix.mobile{
display: none;
}

#nav .nav-toggle{
/* margin:10px; */
display:none;
float:right;
}

#nav #nav-topmenu{
margin-top:5px;
}

#nav #nav-topmenu ul li{
list-style:none;
display:inline-block;
vertical-align:middle;
background:url(../img/bg-nav.png) no-repeat 0 4px;
padding: 0 19px;
line-height: 17px;
margin:0;
}
#nav #nav-topmenu ul li:first-child{background:none;}
#nav #nav-topmenu ul li a{
font-size:14px;
font-weight: normal;
line-height:14px;
}

#nav #nav-topmenu-mobile ul li{
list-style:none;
padding:10px 20px;
margin:0;
border-bottom: 1px solid #ccc;
}
#nav #nav-topmenu-mobile ul li:first-child{background:none;}
#nav #nav-topmenu-mobile ul li a{
font-size:50px;
font-weight: normal;
line-height:50px;
/* color:#fff; */
}

#nav #nav-topmenu-mobile ul li select{
-webkit-appearance: menulist-button;
height: 50px;
width: 210px;
font-size: 30px;
}

#nav .popover{
min-width: 300px;
left:75% !important;
top:55px !important;
}

#nav .popover .arrow{
left:260px !important;
}

<div class="hidden-xs" id="nav-topmenu">
            <select name='langs' class="lang-selector -form-control pull-right">
                <option value="1" <?php if(LANG_ID == 1) echo "selected='selected'" ?> data-lang="en">
                    English
                </option>

                <option value="2" <?php if(LANG_ID == 2) echo "selected='selected'" ?> data-lang="fr">
                    Français
                </option>

                <option value="3" <?php if(LANG_ID == 3) echo "selected='selected'" ?> data-lang="es">
                    Espa&ntilde;ol
                </option>
            </select>
            <ul>
                <?php
                if(!Members_Factory::getRowByAuth() || Members_Factory::getRowByAuth()->is()):
                ?>
                    <li>
                        <a href="<?php echo $this->url(array(), "job")?>"><?php echo __("flexible")?></a>
                    </li>
                <?php
                endif;
                ?>
                <?php
                if(!Members_Factory::getRowByAuth() || Members_Factory::getRowByAuth()->isCompany()):?>
                    <li>
                        <a href="<?php echo $this->url(array(), "find")?>"><?php echo __("Find")?></a>
                    </li>
                <?php
                endif;
                ?>
                <li>
                    <!-- <a href="https://www.example.com/blog/"><?php echo __("Blog")?></a> -->
                    <a href="<?php echo $this->url(array("section" => "companies"), "how-it-works")?>" title="<?php echo __("How it works")?>"><?php echo __("How it works")?></a>
                </li>
                <li>
                    <a href="<?php echo $this->url(array(), "pricing")?>" title="<?php echo __("Pricing")?>"><?php echo __("Pricing")?></a>
                </li>
            </ul>
        </div>
  • Where on that page does the menu go "behind" the background image? And how would you see the menu if it was behind the background image? – Jonathan Kuhn Jan 13 '17 at 18:06
  • Look at this example, that is exactly what I would like to do : https://www.paypal.com/ca/webapps/mpp/merchant – NewPassionnate Jan 13 '17 at 18:07
  • Yea, I did see it. I don't see anything behind their background image (nor would you if it was covered by another image). I see the menu at the top moving a div with a background down. Is that what you are talking about? – Jonathan Kuhn Jan 13 '17 at 18:08
  • I would like for my menu to take the background image. It would be transparent and we would only see the text. – NewPassionnate Jan 13 '17 at 18:10
  • i tried background-color: transparent and it was not working – NewPassionnate Jan 13 '17 at 18:12
  • They just set a background color on the header of `rgba(255, 255, 255, 0.3)`. I just copied that from their website. In the css, that would be: `background-color: rgba(255, 255, 255, 0.3)`. – Jonathan Kuhn Jan 13 '17 at 18:12
  • Then make the menu have no background property so it is transparent? – Mees Kluivers Jan 13 '17 at 18:12
  • The following link of a similar topic have answered here: – Ebite Zion Jan 13 '17 at 18:17
  • Possible duplicate of [How do I give text or an image a transparent background using CSS?](http://stackoverflow.com/questions/806000/how-do-i-give-text-or-an-image-a-transparent-background-using-css) – Jonathan Kuhn Jan 13 '17 at 18:44

1 Answers1

0

Inside of your stylesheet you need to create a class or id for various pieces of the menu.

So the box the menu itself is holding in you would set an opacity attribute to your class or id.

Then you could use an id for the actual menu items and override their opacity with the !important call at the end of the attribute.

davidtaylorjr
  • 420
  • 1
  • 4
  • 17
  • It is like that already. I tried the opacity but it's not applying it properly – NewPassionnate Jan 13 '17 at 20:49
  • Can you drop your code in JSFiddle so I can take a look? – davidtaylorjr Jan 14 '17 at 00:50
  • sorry for the delay. i only got thatmessage. https://jsfiddle.net/#&togetherjs=L4tvDvDmtR – NewPassionnate Jan 16 '17 at 20:05
  • I just understood what the error is but not sure how to solve it. The change I would like to make is in my index.phtml. I have a file header.phtml that is called in layout.phtml. I would like my header to be different on my index only. – NewPassionnate Jan 16 '17 at 20:25
  • I figured what was the problem. the link for the new question is. To sum up, in my layout the header is first then I have the article. I would need to invert those for my image that is in my article to be able to go to the top. problem is, I want that change only in the index : http://stackoverflow.com/questions/41684838/change-header-for-index-only – NewPassionnate Jan 17 '17 at 17:07