How to reduce the button width.

Discussion in 'HTML and CSS' started by kalaivaithi, Mar 7, 2011.

  1. kalaivaithi

    kalaivaithi

    Joined:
    Mar 7, 2011
    Messages:
    1
    Likes Received:
    0
    I am using salmon buttons; I am tried to reduce the button width using CSS style sheet,
    The modification is not affected in the mozilla browser.

    <salmoon :input
    type ="submit"
    name ="hsbScreenB"
    value ="B"
    classname ="buttonFwd"
    onclick ="buttonNav('B');"/>

    CSS code

    .buttonFwd{
    font-family:helvetica,sans-serif;
    font-style:normal;
    font-size:13px;
    text-align:center;
    width: 17px;
    height:24px;
    MARGIN: 0px 0px 0px -10px;
    }


    Here width: 17px; I am increasing and reducing but these changes is not affecting in mozilla firefox browser, Please help me some alternative way for this
     
    kalaivaithi, Mar 7, 2011
    #1
    1. Advertisements

  2. kalaivaithi

    sagar.chavada

    Joined:
    Jul 12, 2019
    Messages:
    3
    Likes Received:
    0
    Location:
    Ahmedabad.
    Using CSS you can use the I d (#) selector to set a style for that particular button:

    #search {
    width: 20em; height: 2em;
    }

    Or if you want to send all buttons to a specific size:

    input[type=submit] {
    width: 20em; height: 2em;
    }

    Or you can use CSS courses if you want certain button classes to be a specific style:

    <input type="submit" id="search" value="Search" class="search" />
    and

    input.search {
    width: 20em; height: 2em;
    }
     
    sagar.chavada, Jul 15, 2019
    #2
    1. Advertisements

  3. kalaivaithi

    Prahlad Makwana

    Joined:
    Jul 18, 2019
    Messages:
    1
    Likes Received:
    0
    Location:
    Ahemdabad
    1. <button style="width: 15px; height: 15px;"></button>
    2. //or
    3. <div id="parent-div" style="width: 100px; height: 100px;">
    4. <button style="width: 18%; height: 18%;"></button>
    5. </div>
     
    Prahlad Makwana, Jul 18, 2019
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.