make space between link button CSS -


does know how can place space between buttons(buttons act links)? cant realy find answer anywhere....

css code:

.btn { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0px; -webkit-box-shadow: 6px 1px 18px #666666; -moz-box-shadow: 6px 1px 18px #666666; box-shadow: 6px 1px 18px #666666; font-family: arial; color: #ffffff; font-size: 14px; background: #447494; padding: 6px 25px 6px 10px; text-decoration: none;   .btn:hover { background: #079ce6; text-decoration: none; 

}

i want space beteen buttons

sample snippet play around included below.

it should depend on how markup structured. in below sample new class added highlight situation, remove class , add property .btn:

.btn {    -webkit-border-radius: 0;    -moz-border-radius: 0;    border-radius: 0px;    -webkit-box-shadow: 6px 1px 18px #666666;    -moz-box-shadow: 6px 1px 18px #666666;    box-shadow: 6px 1px 18px #666666;    font-family: arial;    color: #ffffff;    font-size: 14px;    background: #447494;    padding: 6px 25px 6px 10px;    text-decoration: none;  }  .btn:hover {    background: #079ce6;    text-decoration: none;  }  .btn-space {    margin: 10px 0;  }
<div class="btn">button 1</div>  <div class="btn btn-space">button 2 - give me space!</div>  <div class="btn">button 3</div>  <div class="btn">button 4</div>  <div class="btn">button 5</div>  <div class="btn">button 5</div>  <div class="btn">button 6</div>  <div class="btn">button 7</div>  <div class="btn">button 8</div>  <div class="btn">button 9</div>  <div class="btn">button 10</div>


edit update on question: buttons act links

make use of display property - display: block; or display:inline-block based on requirement.

sample anchor tags:

.btn {    display: block;    -webkit-border-radius: 0;    -moz-border-radius: 0;    border-radius: 0px;    -webkit-box-shadow: 6px 1px 18px #666666;    -moz-box-shadow: 6px 1px 18px #666666;    box-shadow: 6px 1px 18px #666666;    font-family: arial;    color: #ffffff;    font-size: 14px;    background: #447494;    padding: 6px 25px 6px 10px;    text-decoration: none;  }  .btn:hover {    background: #079ce6;    text-decoration: none;  }  .btn-space {    margin: 10px 0;  }
<a class="btn">button 1</a>  <a class="btn btn-space">button 2 - give me space!</a>  <a class="btn">button 3</a>  <a class="btn">button 4</a>  <a class="btn">button 5</a>  <a class="btn">button 5</a>  <a class="btn">button 6</a>  <a class="btn">button 7</a>  <a class="btn">button 8</a>  <a class="btn">button 9</a>  <a class="btn">button 10</a>


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -