tags:

views:

19

answers:

2

hello...i have a php page it have css script. i want to put menubar in that page.how to show menubar at that page without disturbing the css setting for that page? menubar's setting:

<style type="text/css">
        .menubar { margin:0 auto;
                   padding:0;
                   }
                html { background:#ffffff; }
                body{
                         width:900px;
                         height:1000px;
                         overflow:auto;
                         background:#ffffff;
                        }
                div#menu {
                                margin:40px 0 0 95px;
                                text-align:center;
                                position:absolute;
                                }
                div#menu span {
                                font-size:22px;
                                padding-left:14px;
                                }
                div#copyright {

                                font:11px 'Trebuchet MS';
                                color:#fff;
                                text-align:center;
                                clear:left;
                                position:absolute;
                                top:546px;
                                width:560px;
                                }
                div#copyright a { color:#425B7B; }
                div#copyright a:hover { color:#fff; }
</style>

page's setting:

<style type="text/css">
            body
            {
                    font-family:Times new roman, verdana;
                    font-size:22px;
                    width: 900px;
                    height:70px;
                    margin-left: auto;
                    margin-right: auto;
                    margin-top: 6px;
                    background-image:url("wood_texture2.jpg");
            }
    </style>
A: 

The only code in conflict is for the body element, and in this case you're going to have to make decisions as to which values you want for each attribute. For example, you need to pick if you want the page to be 800 or 900px wide.

Ian Wetherbee
i decided at 900px..i want the menu background following the page background or may be become transparent.
klox
A: 

Replace the * in the MenuBar's CSS code with the name of the object that is the menubar. For example, the body in the page css means 'Apply this style to the page'.

If you replace the * with .menubar and add

class="menubar"

to the menu bar object, then the menubar will pick the top style.

Michael Rodrigues
where must i put class="menubar"?at body or at that css script?
klox
In the body. It should be something like ... ... <td class="menubar">or <span class="menubar>or whatever object is the menubar is made out of.
Michael Rodrigues