Jan 30, 2016
224
15
0
මම ඔයාගේ code එක copy කරලා බැලුව ... ඔයාගේ ඔය menu එක තියෙන ul එකේ left padding 40px තියෙනව ... ul එකේ style එකට padding:0px කියන එක add කරන්න ... ඕක ඔය default padding එක මම හිතන්නේ..

හැම වෙලාවෙම අපි style ලියද්දි padding ,margin වගේ ඒවා 0 කරන්න ඕන .. මොකද default ඒවා add වෙනවා ..


ow machan eka hari giya eka dammama.thanks

You have given out too much Reputation in the last 24 hours, try again later.
 
Jan 30, 2016
224
15
0
body, html, ul, li { margin: 0; padding: 0; box-sizing: border-box; }
menu#top { width: 100%; border-bottom: 1px solid #ccc; border-top: 1px solid #ccc; background-color: #fff; }
menu#top ul { list-style-type: none; list-style-image: none; font-size: 0; position: relative; display: block; width: 1170px; height: 44px; margin: 0 auto;}
menu#top ul li { display: inline-block; *display: inline; zoom: 1; border-left: 1px solid #ccc; vertical-align: middle; position: relative; height: 100%; }
menu#top ul li:first-child { border: none; }
menu#top ul li a { font-size: 12px; color: #333; line-height: 24px; font-family: sans-serif; text-decoration: none; font-weight: 600; padding: 10px; display: block; }
menu#top ul li a:hover, menu#top ul li a.active { border-bottom: 3px solid #000; padding-bottom: 7px; }
menu#top ul li a.logo { background: url(http://nav.files.bbci.co.uk/orbit/1.0.0-204.0515ca1/img/blq-orbit-blocks_grey_alpha.png) no-repeat 10px 10px scroll #fff; display: block; width: 84px; height: 24px; text-indent: -9999px; border: none; }

meke rathu karala thiyena ewa daala thiyenne methanadi mokak wennada kiyala puluwan free welaka danna :love:
 
Last edited:

Lakshan-Seram

Well-known member
  • May 31, 2011
    24,725
    12,643
    113
    127.0.0.1:8080/Kandy
    Box sizing: refer docs

    Font-size: 0: trick to remove white space between list elements

    List-style-image: list wala bullete wage images remove karana eka

    *display: inline, zoom:1 : IE7,6 trick.. they do not support inline-block
     
    Jan 30, 2016
    224
    15
    0
    width එක විතරයි වෙනස් කරේ...:P

    නව ආරකින් නව අවුලක් :growl::growl::growl:
    ඇයි බන් මට මේ වගේ එරර් ගොඩක් එන්නේ. හිතනවා ඕනිවට වැඩියිද? නැත්තන් ගොනා සේ හිතනවද?

    අද ආයේ ඔක්කොම මකල මුල ඉදන් කරන්න ගත්ත.අහම්බෙන් වගේ මේ දේ සෙට් වුනේ.කොහොමද එහෙම වෙන්නෙ කියල දැන් අවුල්. මම නිකටම border එකක් දැම්මා.එත්කොට හරියට බ්‍රව්සර් එකේ ඉඩ නැතුව ලස්ස්නට බාර් එක හිටිනව.එක අයින් කරපු ගමන් පහලට පනිනව.

    දැන් එරර් එක කලින් ආපු හින්ද දන්නව මේක මේ මෙනු එක ස්ටයිල් කරල නැති හින්ද කියල.එ වුනට මේ වගේම සීන් එකක් ආයෙ වුනොත් කියල මේකත් අහන්නම හිතුන.

    HTML:
    <!doctype html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>BBC - clone</title>
        <link rel="stylesheet" type="text/css" href="style/main.css"/>
    </head>
        
    <body>
    <div class="container">
        
        <div class="top_bar">
        <div class="menu">
            <ul class="nav">
                <li><a href="#" class="logo" alt="logo"></a></li>
                <li><a href="#" class="sign_in">Sign In</a></li>
                <li><a href="#">News</a></li>
                <li><a href="#">Sport</a></li>
                <li><a href="#">Weather</a></li>
                <li><a href="#">Shop</a></li>
                <li><a href="#">Earth</a></li>
                <li><a href="#">Travel</a></li>
                <li><a href="#">Capital</a></li>
                <li><a href="#">Culture</a></li>
                <li><a href="#">Autos</a></li>
                <li><a href="#">More</a></li>
            </ul>
        </div> 
        </div>  
            
            
        
            
            
    </div>
    </body>
    </html>
    PHP:
    @import url("https://necolas.github.io/normalize.css/4.1.1/normalize.css");   
    
    body{
        background-color: aliceblue;
    }
    
    .top_bar{
        height:35px;
        border:.1em solid #000000;
        background-color: black;
    }

    border:.1em solid #000000;