WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 R24 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Fixed width menu items - solved
  • Print
Pages: [1]   Go Down

Author Topic: Fixed width menu items - solved  (Read 4201 times)

enegi

  • Guest
Fixed width menu items - solved
« on: February 26, 2009, 11:19:18 AM »
Tryning to use an image as a background to the menu <li> tag but  the image gets clipped to the lingth of the letters.
Using CSS  to set background-image, width and hight of the <li> tag doesnt work.
Using CSS to set background-image, width and hight of the <li><a> tag dosnt work.

I dont want a hover effect but when viewing a page the <li> backgound it shall change (changing the image)

solution

Code: [Select]
<div id="menu">
    <?php show_menu2(
    
0,
        SM2_ROOT,
        SM2_CURR+1,
        SM2_TRIM,
        &#39;[li][ac]<div class="menumover">[menu_title]</div></a>&#39;,
        &#39;</li>&#39;,
        &#39;[ul]&#39;,
        &#39;</ul>&#39;,
        false,
        false
    
); ?>

</div>


Code: [Select]
/*.........MENY..........*/
#menu
{
    position: absolute;
    top: 124px;
    left: 44px;
    width: 900px;
    height: 24px;
    text-align: left;
}
#menu UL
{
    margin: 0px;
    padding: 0px;
    list-style-type: none;
}
#menu UL LI
{
    display: inline;
}
#menu UL LI A
{
    display: inline-block;
    width: 172px;
    height: 24px;
    background-image: url(meny_inaktiv.gif);
    background-repeat: no-repeat;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: bold;
}
#menu UL LI A.menu-current
{
    background-image: url(meny_aktiv.gif);
}
.menumover
{
    position: relative;
    top: 7px;
    left: 7px;
}


Just so you know..it doesnt validate...darn..
« Last Edit: March 03, 2009, 12:39:56 PM by enegi »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Fixed width menu items - solved
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2