Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding space between buttons?

Hi I have a code here that is all perfect except one thing. There is NO space between each button in the code. I've tried margin, but unfortunately its an unordered list so I am a bit confused. What would I add or replace to have space between the two buttons. Help?? :(

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<style type="text/css">

    .rollovericons a#terms{
        display: block;
        width:138px;
        height:27px;
        background:  url(http://icpy.webs.com/button/Terms.png) no-repeat;
    }

    .rollovericons a:hover#terms{
        background: url(http://icpy.webs.com/button/Terms0.png) no-repeat;
    }
    .rollovericons a#contact{
        display: block;
        width:138px;
        height:27px;
        background:  url(http://icpy.webs.com/button/contact.png) no-repeat;
    }

    .rollovericons a:hover#contact{
        background: url(http://icpy.webs.com/button/contact0.png) no-repeat;
    }

</style>

<body>

<div class="rollovericons">
    <a href="http://www.twitter.com" id="terms"></a>
    <a href="http://www.twitter.com" id="contact"></a>
</div>

</body>
like image 852
raininggalaxies Avatar asked Jul 14 '13 21:07

raininggalaxies


People also ask

How do you put a space between buttons in HTML?

add &nbsp; between them.

How do I put spaces between buttons in CSS?

There are several methods that we can use to put spacing between two buttons. But the easiest way to achieve this is by using the margin property. You can either apply margin-right on the first button or margin-left on the second button. Both ways you can achieve the same task.

How do I put a space around a button in text?

You can add more space between a button and text box by using “margin” attribute. If you want to add right side more space then add “margin- right”, for left side “magin-left”, for top side “margin-top”, for bottom “margin-bottom”.

How do I put a space between bootstrap buttons?

Button Toolbar with Spacing Utilities [property][sides]-[size] will have the same results on all screens. If you want different spacing on different devices, you can add breakpoints and use the class . [property][sides]-[breakpoint]-[size] .


1 Answers

Just do:

.rollovericons a{
    margin: 10px;
}

That will add a margin to every <a> item inside the rollovericons class.

like image 63
Francisco Presencia Avatar answered Oct 05 '22 03:10

Francisco Presencia