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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with transparency?

    Okay Im working on a layout for my blog and it has a CSS dropdown menu. the menu works fine but there is a certain part of the menu that is too 'tall' I cant quite figure out how to either shorten the height or make that part transparent all together.

    Help with transparency?-sample.jpg

    I attached a sample of the image. as you can see the background to that menu extends to the top of the page, I need it either invisible or to be lowered in height below the red line I drew. I have tried everything and it either pushed everything down and throws the alignment off, or makes the entire menu transparent.. PLZ help! thanks!

    Heres the CSS for the menu:
    Code:
    <style type='text/css'>
    
    #cssmenu ul,
    #cssmenu li,
    #cssmenu span,
    #cssmenu a {
      margin: 0;
      padding: 0;
      position: relative;
      
    }
    #cssmenu {
      height: 49px;
      border-radius: 5px 5px 0 0;
      -moz-border-radius: 5px 5px 0 0;
      -webkit-border-radius: 5px 5px 0 0;
      background: #141414;  background:url
    
    (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAxCAIAAACUDVRzAAAAA3NCSVQICAjb4U/gAAAALElEQVQImWMwMrJi
    
    +v//PxMDw3+m//8ZoPR/qBgDEhuXGLoeYswhXg8R5gAAdVpfoJ3dB5oAAAAASUVORK5CYII=) 100% 100%;
      background: -moz-linear-gradient(top, #32323a 0%, #141414 100%);
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #32323a), color-stop(100%, #141414));
      background: -webkit-linear-gradient(top, #32323a 0%, #141414 100%);
      background: -o-linear-gradient(top, #32323a 0%, #141414 100%);
      background: -ms-linear-gradient(top, #32323a 0%, #141414 100%);
      background: linear-gradient(to bottom, #32323a 0%, #141414 100%);
      border-bottom: 2px solid #6c5437;
    }
    #cssmenu:after,
    #cssmenu ul:after {
      content: '';
      display: block;
      clear: both;
    }
    #cssmenu a {
      background: #141414; background:url
    
    (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAxCAIAAACUDVRzAAAAA3NCSVQICAjb4U/gAAAALElEQVQImWMwMrJi
    
    +v//PxMDw3+m//8ZoPR/qBgDEhuXGLoeYswhXg8R5gAAdVpfoJ3dB5oAAAAASUVORK5CYII=) 100% 100%;
      background: -moz-linear-gradient(top, #32323a 0%, #141414 100%);
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #32323a), color-stop(100%, #141414));
      background: -webkit-linear-gradient(top, #32323a 0%, #141414 100%);
      background: -o-linear-gradient(top, #32323a 0%, #141414 100%);
      background: -ms-linear-gradient(top, #32323a 0%, #141414 100%);
      background: linear-gradient(to bottom, #32323a 0%, #141414 100%);
      color: #ffffff;
      display: inline-block;
      font-family: Arial, Verdana, sans-serif;
      font-size: 14px;
      line-height: 49px;
      padding: 0 30px;
      text-decoration: none;
    }
    #cssmenu ul {
      list-style: none;
    }
    #cssmenu &gt; ul {
      float: left;
    }
    #cssmenu &gt; ul &gt; li {
      float: left;
    }
    #cssmenu &gt; ul &gt; li:hover:after {
      content: '';
      display: block;
      width: 0;
      height: 0;
      position: absolute;
      left: 50%;
      bottom: 0;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-bottom: 10px solid #6c5437;
      margin-left: -10px;
    }
    #cssmenu &gt; ul &gt; li:first-child &gt; a {
      border-radius: 5px 0 0 0;
      -moz-border-radius: 5px 0 0 0;
      -webkit-border-radius: 5px 0 0 0;
    }
    #cssmenu &gt; ul &gt; li:last-child &gt; a {
      border-radius: 0 5px 0 0;
      -moz-border-radius: 0 5px 0 0;
      -webkit-border-radius: 0 5px 0 0;
    }
    #cssmenu &gt; ul &gt; li.active &gt; a {
      box-shadow: inset 0 0 3px #000000;
      -moz-box-shadow: inset 0 0 3px #000000;
      -webkit-box-shadow: inset 0 0 3px #000000;
      background: #070707;
     background:url
    
    (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAxCAIAAACUDVRzAAAAA3NCSVQICAjb4U/gAAAALklEQVQImWNQU9Nh
    
    +v//PxMDw3+m//8ZkNj/mRgYIHxy5f//Z0BSi18e2TwS5QG4MGB54HL+mAAAAABJRU5ErkJggg==) 100% 100%;
      background: -moz-linear-gradient(top, #26262c 0%, #070707 100%);
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #26262c), color-stop(100%, #070707));
      background: -webkit-linear-gradient(top, #26262c 0%, #070707 100%);
      background: -o-linear-gradient(top, #26262c 0%, #070707 100%);
      background: -ms-linear-gradient(top, #26262c 0%, #070707 100%);
      background: linear-gradient(to bottom, #26262c 0%, #070707 100%); } #cssmenu &gt; ul &gt; li:hover &gt; a {
      background: #070707;
      background:url
    
    (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAxCAIAAACUDVRzAAAAA3NCSVQICAjb4U/gAAAALklEQVQImWNQU9Nh
    
    +v//PxMDw3+m//8ZkNj/mRgYIHxy5f//Z0BSi18e2TwS5QG4MGB54HL+mAAAAABJRU5ErkJggg==) 100% 100%;
      background: -moz-linear-gradient(top, #26262c 0%, #070707 100%);
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #26262c), color-stop(100%, #070707));
      background: -webkit-linear-gradient(top, #26262c 0%, #070707 100%);
      background: -o-linear-gradient(top, #26262c 0%, #070707 100%);
      background: -ms-linear-gradient(top, #26262c 0%, #070707 100%);
      background: linear-gradient(to bottom, #26262c 0%, #070707 100%);
      box-shadow: inset 0 0 3px #000000;
      -moz-box-shadow: inset 0 0 3px #000000;
      -webkit-box-shadow: inset 0 0 3px #000000; } #cssmenu .has-sub {
      z-index: 1;
    }
    #cssmenu .has-sub:hover &gt; ul {
      display: block;
    }
    #cssmenu .has-sub ul {
      display: none;
      position: absolute;
      width: 200px;
      top: 100%;
      left: 0;
    }
    #cssmenu .has-sub ul li {
      *margin-bottom: -1px;
    }
    #cssmenu .has-sub ul li a {
      background: #6c5437;
      border-bottom: 1px dotted #a79887;
      filter: none;
      font-size: 11px;
      display: block;
      line-height: 120%;
      padding: 10px;
    }
    #cssmenu .has-sub ul li:hover a {
      background: #4a3a26;
    }
    #cssmenu .has-sub .has-sub:hover &gt; ul {
      display: block;
    }
    #cssmenu .has-sub .has-sub ul {
      display: none;
      position: absolute;
      left: 100%;
      top: 0;
    }
    #cssmenu .has-sub .has-sub ul li a {
      background: #4a3a26;
      border-bottom: 1px dotted #92897d;
    }
    #cssmenu .has-sub .has-sub ul li a:hover {
      background: #281f14;
    }
        </style>
    It is called using:
    Code:
    <div id='cssmenu' style='padding-top:45px'>
    <ul>
       <li><a href='http://mannovations.blogspot.com/'><span>Home</span></a></li>
       <li><a href='http://mannovations.blogspot.com/p/about.html'><span>About</span></a></li>
       <li class='has-sub'><a href='http://mannovations.blogspot.com/p/dress-appearance.html'><span>Style</span></a>
          <ul>
             <li class='has-sub'><a href='#'><span>Dress</span></a>
                <ul>
                   <li class='last'><a href='suit.htm'><span>The Suit</span></a></li>
                </ul>
             </li>
          </ul>
       </li>
       <li><a href='http://mannovations.blogspot.com/p/the-bank.html'><span>The Bank</span></a></li>
       <li><a href='http://mannovations.blogspot.com/p/man-skills.html'><span>Man Skills</span></a></li>
       <li><a href='http://mannovations.blogspot.com/p/recipes.html'><span>Recipes</span></a></li>
       <li><a href='http://mannovations.blogspot.com/p/fitness-health.html'><span>Health</span></a></li>
       <li><a href='#'><span>Shop</span></a></li>
       <li class='last'><a href='#'><span>Contact</span></a></li>
    </ul>
    </div>

  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    264
    Thanks
    49
    Thanked 1 Time in 1 Post
    Can you post a URL to your site so we can use inspection tools to help?


  •  

    Posting Permissions

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