Php side menu is beautiful, can be expanded to the right or left, support FF, IE_PHP tutorial

Source: Internet
Author: User
Php side menu is beautiful, you can expand to the right or left, support FF, IE. In IE8, you must add a sub-menu to hide and copy the code as follows: linkhref..cssright_menu.css? 1.1.26relstylesheettypetextcssDIVclassc _ lDIVclassmenuUL? Phpmysql_select_db
You must add a sub-menu to IE8 to hide it.

The code is as follows:






    Mysql_select_db ($ database_lr, $ lr );
    $ Query = mysql_query ("SELECT * FROM bigclass order by sort ");
    While ($ row = mysql_fetch_array ($ query ))
    {
    $ Bigclassid = $ row ['bigclassid '];
    $ Bigclassname_leftmenu = $ row ['bigclassname'];
    If ($ htmlname = 1 ){
    $ Bigclass_htmlname_leftmenu = $ bigclassname_leftmenu; // category name
    $ Bigclass_htmlname_leftmenu = tihuan ($ bigclass_htmlname_leftmenu );
    }
    If ($ htmlname = 0 ){
    $ Bigclass_htmlname_leftmenu = $ bigclassid;
    }
    ?>
  • //
    Mysql_select_db ($ database_lr, $ lr );
    $ Query_num = "select count (*) from smallclass where bigclassid = '$ bigclassid '";
    $ Rs_num = mysql_query ($ query_num );
    $ Myrow_num = @ mysql_fetch_array ($ rs_num );
    $ Smallclass_num = $ myrow_num [0];
    If ($ smallclass_num> 0 ){
    Echo "id = arrow ";
    }
    ?>
    "Class =" bigclasslink ">
    Mysql_select_db ($ database_lr, $ lr );
    $ Query_small = mysql_query ("SELECT * FROM smallclass where bigclassid = '$ bigclassid' order by sort ");
    If ($ smallclass_num = 0)
    {
    Echo"
    • Href =>
    ";
    }
    Else
    {
    ?>

      While ($ rs = mysql_fetch_array ($ query_small ))
      {
      $ Smallclassid_small_leftmenu = $ rs ['smallclassid '];
      $ Smallclassname_small = $ rs ['smallclassname']; // small class name
      If ($ htmlname = 1 ){
      $ Smallclass_htmlname = $ smallclassname_small;
      $ Smallclass_htmlname = tihuan ($ smallclass_htmlname );
      }
      If ($ htmlname = 0 ){
      $ Smallclass_htmlname = $ smallclassid_small_leftmenu;
      }
      ?>

    • "Class =" smallclasslink ">


    • }
      ?>



  • }?>



CSS file

The code is as follows:


UL {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none
}
LI {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none
}
. C_l {
FLOAT: left; WIDTH: 200px; background: url (../images/right_menu_bg.jpg );
}
. Menu {
Z-INDEX: 9999; MARGIN-BOTTOM: 10px; WIDTH: 198px;
}
. Menu LI {
FONT-WEIGHT: bold; FLOAT: left; WIDTH: 198px; LINE-HEIGHT: 26px; HEIGHT: 26px;
/*
BACKGROUND: url (../images/line01.gif) repeat-x 50% bottom;
*/
}
. Menu li {
LINE-HEIGHT: 26px; HEIGHT: 26px;
/*
BACKGROUND: url (../images/line01.gif) repeat-x 50% bottom;
*/
}
# Arrow {
BACKGROUND: url (../images/aw02.gif) no-repeat 185px 10px;
LINE-HEIGHT: 26px; HEIGHT: 26px;
}
. Menu li a: hover {
BACKGROUND: # eeeeee; LINE-HEIGHT: 26px; POSITION: relative; HEIGHT: 26px
}
. Menu UL {
Z-INDEX: 9999; right: 185px; POSITION: absolute; TOP:-0000000px; background: url (../images/right_menu_bg.jpg);/* smallclass right kongzhi celafangxiang */
}
. Menu ul li {
DISPLAY: block; FONT-WEIGHT: normal; BACKGROUND: url (../images/aw02.gif) no-repeat 10px 10px; LINE-HEIGHT: 25px! Important; TOP: 0px! Important; HEIGHT: 25px! Important
}
. Menu UL. B _top {
BORDER-LEFT-WIDTH: 0px; WIDTH: 199px;
}
. Menu UL. B _top {
DISPLAY: block
}
. Menu {
PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 0px; WIDTH: 198px; TEXT-INDENT: 18px; PADDING-TOP: 0px; TEXT-DECORATION: none
}
. Menu A: visited {
PADDING-RIGHT: 0px; DISPLAY: block; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 0px; WIDTH: 198px; TEXT-INDENT: 18px; PADDING-TOP: 0px; TEXT-DECORATION: none
}
. Menu ul li {
DISPLAY: block; BACKGROUND: none transparent scroll repeat 0% 0%; COLOR: #000; TOP: 0px! Important; HEIGHT: 25px! Important
}
. Menu ul li a: visited {
DISPLAY: block; BACKGROUND: none transparent scroll repeat 0% 0%; COLOR: #000; TOP: 0px! Important; HEIGHT: 25px! Important
}
. Menu ul li a: hover {
DISPLAY: block; BACKGROUND: url (.. /images/aw02.gif) # eee no-repeat 10px 10px; WIDTH: 198px; COLOR: # d15400; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; TOP: 0px! Important; HEIGHT: 25px! Important; BORDER-BOTTOM-STYLE: none
}
. Menu TABLE {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 0px; PADDING-TOP: 0px; BORDER-COLLAPSE: collapse; HEIGHT: 0px
}
* HTML. menu A: hover {
POSITION: relative
}
. Menu LI: hover {
POSITION: relative
}
. Menu UL: hover UL {
TOP:-1px
}
. Menu ul li: hover> {
BACKGROUND: # eee; POSITION: relative; TEXT-DECORATION: none
}
. Menu ul li: hover> {
BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; POSITION: relative; TOP: 0px; BORDER-BOTTOM-STYLE: none
}


Menu UL's left or right controls to the right or displays the sub menu to the left.

The authorization code is as follows: link href = "../css/right_menu.css? 1.1.15 "rel =" stylesheet "type =" text/css "DIV class = c_l DIV class = menu UL? Php mysql_select_db...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.