Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Problem
How to make menu as menu on left side of this sample web site as below
الصفوه للإعلان والديكور[^]
How to do same menu on website above with hover and red line above when mouse cursor
refer to word on menu
Actually i need to be same menu on website ?

What I have tried:

what i try as following
<!doctype html>
<html
<head>
<title> safwa for decore </title>
<style type="text/css">
    ul{
        padding: 0;
        list-style: none;
        background: #f2f2f2;
    }
    ul li{
        display: inline-block;
        position: relative;
        line-height: 21px;
        text-align: left;
    }
    ul li a{
        display: block;
        padding: 8px 25px;
        color: #333;
        float: left; 
        padding:5px 0; 
        color:#fff; 
        text-decoration:none;
        margin:0 10px; 
        font-family:arial;
        
        
    }
    ul li a:hover{
        color: #fff;
        background: #939393;
        border-top:3px solid #fff;

    }
    ul li ul.dropdown{
        min-width: 100%; /* Set width of the dropdown */
        background: #f2f2f2;
        display: none;
        position: absolute;
        z-index: 999;
        left: 0;
    }
    ul li:hover ul.dropdown{
        display: block;	/* Display the dropdown */
    }
    ul li ul.dropdown li{
        display: block;
    }

</style>
</head>
<body>
<img src="alsafwa-logo.png" alt ="logo" width="300px" heigh="200px" style="float:right"/>
<ul>
<li><a href = "#">الرئيسيه  </a> </li>
<li><a href = "#">من نحن </a> </li>
<li><a href ="#"> خدماتنا </a> </li>
<li><a href ="#"> اعمالنا </a> </li>
<li><a href ="#"> اخر الاخبار </a> </li>
<li><a href ="#"> اتصل بنا </a> </li>
</ul>
</body>
</html>
Posted
Updated 6-Aug-19 18:42pm
Comments
shawn patil 26-Jul-19 3:53am    
Can you please explain what exactly you want, because there is no left menu in sample website, and according to your explanation i didn't got you.

Hello !!
I added red line when mouse cursor refer to word on menu and also fix menu on left side. Try this.

<!doctype html>
<html
<head>
<title> safwa for decore </title>

<style>
    body       
    {
        margin:0px;
    }       
    ul        
    {
        margin:0px;
        padding: 5px;;
        list-style: none;
        background: #f2f2f2;
    }
    ul li
    {
        display: inline-block;
        position: relative;
        line-height: 21px;
        text-align: left;
    }
    ul li a
    {
        display: block;
        padding: 8px 25px;
        color: #333;
        float: left;
        padding:5px 0;
        color:#fff;
        margin:0 10px;
        font-family:arial;
    }
        
    ul li a:hover 
    {
            color: #fff;
            background: #939393;            
            text-decoration: overline;
            text-decoration-color: red;
    }
    ul li ul.dropdown
    {
        min-width: 100%; /* Set width of the dropdown */
        background: #f2f2f2;
        display: none;
        position: absolute;
        z-index: 999;
        left: 0;
    }
    ul li:hover ul.dropdown
    {
        display: block;	/* Display the dropdown */
    }
    ul li ul.dropdown li{
        display: block;
    }
</style>
</head>

<body>
<img src="alsafwa-logo.png" alt ="logo" width="300px" heigh="200px" style="float:right"/>
<ul>
<li><a href = "#">الرئيسيه  </a> </li>
<li><a href = "#">من نحن </a> </li>
<li><a href ="#"> خدماتنا </a> </li>
<li><a href ="#"> اعمالنا </a> </li>
<li><a href ="#"> اخر الاخبار </a> </li>
<li><a href ="#"> اتصل بنا </a> </li>
</ul>
</body>
</html>
 
Share this answer
 
Quote:
Can you please explain what exactly you want, because there is no left menu in sample website, and according to your explanation i didn't got you.
 
Share this answer
 
Comments
Richard Deeming 22-Jul-19 15:07pm    
If you want to ask for clarification, click the "Have a Question or Comment?" button under the question. DO NOT post your question in the "Add your solution here" box.
shawn patil 26-Jul-19 3:52am    
understood, thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900