Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Newbie: removing space in CSS menu using li in inline display

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27516
    Kayote
    Member

    Hi All,

    Im new to CSS and have a set target of learning & publishing my website in CSS by the end of the month. It looks so simple and friendly yet now that Im trying to write the code (Im not a programming but an accountant by profession), it looks deceptively complicated.

    My question:

    Im trying to build a CSS horizontal menu with hover drop downs, however, when I use the ‘display: inline’ property with li (list) items, I get spaces between the li (list) items in the bar. How do I remove this space?



  • Views






  • Help









    • Overview

    • Collar

    • Sleeves

    • Body



    #tabas_menu {
    position: absolute;
    background: rgb(123,345,567);
    top: 110px;
    left: 200px;
    }

    ul#tabas_menu {
    padding: 0;
    margin: 0;
    }

    .tabBut {
    display: inline;
    white-space:
    list-style: none;
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,142,190,1)),to(rgba(188,22,93,1)));
    background: -moz-linear-gradient(top, rgba(255,142,190,1), rgba(188,22,93,1));
    font-family: helvetica, calibri, sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 20px;
    text-shadow: 1px 1px 1px rgba(99,99,99,0.5);
    -moz-border-radius: 0.3em;
    -moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
    -webkit-border-radius: 0.3em;
    -webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
    padding: 6px 18px;
    border: 1px solid rgba(0,0,0,0.4);
    margin: 0;
    }

    I did manage to remove the space by using the ‘float: left’ property but would love to find out how to get the same effect using the display: inline property. Many thanks

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.