RTL support for bootstrap 3 submenus - html

I'm having a problem adjusting drop down sub menus to open to the right side (the software layout is in Hebrew).
I saw similar answers with providing external libraries, I don't want to do that. I want simply twick my css a bit so it will work ,I'm almost there, this is where you can help me :)
Those 2 pictures illustrate the issues I'm experiencing:
I have three problems:
change caret position to the left
change caret location to the left
open submenu to the left side (right now it opens to the left but overlaps with the main one, but I can live with that, the above 2 are much more important)
In this link, it is mentioned that bootstrap 3 doesn't support sub menus no more, I'm controlling it at my css.
**
html
**:
<div ng-show="buildings.total_buildings" tooltip="מגוון פעולות שניתן לבצע על הרשומות שבחרתם" class="btn-group">
<button class="btn btn-default dropdown-toggle btn-lg" data-toggle="dropdown">
<i class="fa fa-lg fa-building "></i>
<span class="caret"></span>
<span class="badge_success badge">{{buildings.total_buildings}}</span>
</button>
<ul class="dropdown-menu">
<li>
<i class="fa fa-file-pdf-o"></i> יצא לקובץ pdf
</li>
<li class="dropdown-submenu pull-left">
<i class="fa fa-envelope-o"></i> שלח מייל
<ul href="javascript:void(0);" class="dropdown-menu">
<li><i class="fa fa-building"></i> כולם
</li>
<li><i class="fa fa-building owner"></i> בעלים
</li>
<li><i class="fa fa-building renter"></i> שוכרים
</li>
<li><i class="fa fa-building defecto"></i> דיירים
</li>
</ul>
</li>
<li>
<i class="fa fa-comment-o"></i> שלח סמס
</li>
<li>
<i class="fa fa-envelope-o"></i> שלח מייל
</li>
<li>
<i class="fa fa-male"></i> הצג דיירים
</li>
<li>
<i class="fa fa-database"></i> קרא וטען נתונים
</li>
<li>
<i class="fa fa-trash-o"></i> מחק
</li>
</ul>
</div>
**
CSS
**:
.dropdown-submenu {
position: relative;
text-align: right;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #fff;
}
.dropdown-submenu.pull-left {
float: right !important;
}
.dropdown-submenu.pull-left>.dropdown-menu {
right: 100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}

Please take a look at this jsFiddle. I've made a few changes to your CSS and added some new styles:
.btn-group, .btn-group-vertical {
float: right;
}
.dropdown-menu {
min-width: 190px;
}
.dropdown-menu>li>a {
text-align: right;
}
.dropdown-submenu>a:before {
content:'◄';
float: left;
margin-left: 0px;
color: #ccc;
font-size: 10px;
margin-top: 3px;
}
.dropdown-submenu>a:after {
display: none;
}
.dropdown-submenu>a:hover:before {
color: #fff;
}

Related

I want to place my icons in the middle of the circle [duplicate]

This question already has answers here:
How can I center text (horizontally and vertically) inside a div block?
(27 answers)
How to vertically align an image inside a div
(37 answers)
How can I vertically align elements in a div?
(28 answers)
Closed 2 years ago.
How can I place my icons in the middle of the circle, based on the following picture:
Here is my HTML code:
<footer>
<div class="footer-bg-1">
<h1 class="display-5" style="color: white">Find Me on</h1><br>
<ul class="socialnetworks">
<li>
<a href="https://www.linkedin.com/" title="LinkedIn">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
<li>
<a href="https://github.com/" title="GitHub">
<i class="fab fa-github"></i>
</a>
</li>
<li>
<a href="https://twitter.com/" title="Twitter">
<i class="fab fa-twitter"></i>
</a>
</li>
</div>
</footer>
Here is my CSS code that needs to be modified to place the icons in the middle of the white circles:
ul.socialnetworks {
margin: 0;
border:15px;
padding: 0;
width: 100%;
text-align: center;
}
ul.socialnetworks > li {
display: inline-block;
}
ul.socialnetworks > li > a {
display: inline-block;
font-size: 25px;
line-height: 50px;
width: 58px;
height: 58px;
border-radius: 36px;
background-color: #313132;
box-shadow: 0px 0px 2px white;
color: white;
margin: 0 4px 3px 0;
border: 8px solid;
}
You can try something like this:
.item{
border-radius:50%;
background-color:black;
border:15px solid white;
width:50px;
height:50px;
display:inline-flex;
}
body{
background-color:black;
}
.item i{
margin-top: 25%;
margin-left: 25%;
color:white;
}
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<div class="item">
<i class="material-icons">add_task</i>
</div>
<div class="item">
<i class="material-icons">add_task</i>
</div>
<div class="item">
<i class="material-icons">add_task</i>
</div>
Icons with class .fab have parameter display: inline-block. This means that vertical-align: middle can be used.
Just add it to your css:
.fab {
vertical-align: middle;
}
ul.socialnetworks {
margin: 0;
border:15px;
padding: 0;
width: 100%;
text-align: center;
}
ul.socialnetworks > li {
display: inline-block;
}
ul.socialnetworks > li > a {
display: inline-block;
font-size: 25px;
line-height: 50px;
width: 58px;
height: 58px;
border-radius: 36px;
background-color: #313132;
box-shadow: 0px 0px 2px white;
color: white;
margin: 0 4px 3px 0;
border: 8px solid;
}
.fab {
vertical-align: middle;
}
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
<footer>
<div class="footer-bg-1">
<h1 class="display-5" style="color: white">Find Me on</h1><br>
<ul class="socialnetworks">
<li>
<a href="https://www.linkedin.com/" title="LinkedIn">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
<li>
<a href="https://github.com/" title="GitHub">
<i class="fab fa-github"></i>
</a>
</li>
<li>
<a href="https://twitter.com/" title="Twitter">
<i class="fab fa-twitter"></i>
</a>
</li>
</ul>
</div>
</footer>
set the line-height equal to height line-height: 58px;
ul.socialnetworks {
margin: 0;
border: 15px;
padding: 0;
width: 100%;
text-align: center;
}
ul.socialnetworks>li {
display: inline-block;
}
ul.socialnetworks>li>a {
display: inline-block;
font-size: 25px;
line-height: 58px;
width: 58px;
height: 58px;
border-radius: 36px;
background-color: #313132;
box-shadow: 0px 0px 2px white;
color: white;
margin: 0 4px 3px 0;
border: 8px solid;
}
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<footer>
<div class="footer-bg-1">
<h1 class="display-5" style="color: white">Find Me on</h1><br>
<ul class="socialnetworks">
<li>
<a href="https://www.linkedin.com/" title="LinkedIn">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
<li>
<a href="https://github.com/" title="GitHub">
<i class="fab fa-github"></i>
</a>
</li>
<li>
<a href="https://twitter.com/" title="Twitter">
<i class="fab fa-twitter"></i>
</a>
</li>
</div>
</footer>

restrict div resize on button hover

I'm creating a nav bar with buttons using css that I'd like to have a background color on hover WITHOUT the div resizing. I want the buttons to stay in place, just have the background color behind them.
.topnav {
overflow: hidden;
background-color: #1C313A;
}
.topnav a {
float: left;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav-right {
float: right;
}
button {
padding: 0px 0px;
background-color: transparent;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
margin-left: 20px;
}
button:hover {
width: 50px;
height: 50px;
background-color: #192C34;
border-radius: 50%;
padding: 0px 0px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="topnav">
<a href="#home">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<a href="#news"><button>
<i class="fa fa-upload fa-lg"></i>
</button></a>
<a href="#contact">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<div class="topnav-right">
<a class="logo" style="pointer-events:none;">TidyBlocks</a>
</div>
</div>
Current Output:
Desired Output
.topnav {
overflow: hidden;
background-color: #1C313A;
}
.topnav a {
float: left;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav-right {
float: right;
}
button {
padding: 0px 0px;
background-color: transparent;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
margin-left: 20px;
width: 50px;
height: 50px;
}
button:hover {
background-color: #192C34;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="topnav">
<a href="#home">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<a href="#news"><button>
<i class="fa fa-upload fa-lg"></i>
</button></a>
<a href="#contact">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<div class="topnav-right">
<a class="logo" style="pointer-events:none;">TidyBlocks</a>
</div>
</div>
Please put height and width in button not hover.
And yes you can't put button element in a tag it's not validated.
Please check your code on https://validator.w3.org/.
.topnav {
overflow: hidden;
background-color: #1C313A;
}
.topnav a {
float: left;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav-right {
float: right;
}
button {
border-radius: 50%;
padding: 0px 0px;
background-color: transparent;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
margin-left: 20px;
width: 50px;
height: 50px;
}
button:hover {
background-color: #192C34;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="topnav">
<a href="#home">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<a href="#news"><button>
<i class="fa fa-upload fa-lg"></i>
</button></a>
<a href="#contact">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<div class="topnav-right">
<a class="logo" style="pointer-events:none;">TidyBlocks</a>
</div>
</div>

How to align icons and fonts with similar margin

I am trying to get my icons and text to have same padding or margin. If you run the code you will see one category is near an icon and other one is far. I want to have consistency. I tried a lot of things but it doesnt reflect anything
.category_nav
{
height: 40px;
margin-top: 38px;
}
.category_nav_ul
{
list-style-type: none;
padding:0;
}
.category_nav_ul > li
{
display: inline-block;
}
#category_nav_ul_category
{
width: 380px;
cursor: pointer;
}
#category_nav_div
{
margin-top: 5px;
width: 380px;
position: absolute;
background-color: white;
padding-bottom: 10px;
}
#categories_content
{
margin-top: 10px;
}
.category_nav_div .content:hover
{
}
.categories
{
list-style: none;
}
.category
{
padding-top: 6px;
padding-bottom: 6px;
margin-bottom: 1px;
border: 0;
border-radius: 0;
}
.category:hover
{
border: 2px;
background:linear-gradient(to right, red 0px, red 3px, transparent 3px);
background-color: white;
border-top: 1px solid grey;
border-bottom: 1px solid grey;
}
.category_icon
{
width: 20px !important;
padding-right: 5px;
background-color: red;
}
.category_content
{
margin-left: 15px !important;
}
.light-border
{
border: 1px solid #e8e8e8;
border-top: none;
}
h2.flash_title
{
color: rgb(120, 120, 120);
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
background: #fff;
color: #666;
font-size: 14px;
padding-left: 19px;
font-weight: 400;
}
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div id="category_nav_div" class="light-border">
<div class="content" id="categories_content">
<ul class="categories list-group">
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-camera"></i>
</span>
<span class="category_content">
Camera
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-info-circle"></i>
</span>
<span class="category_content">
Clothes
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-mobile"></i>
</span>
<span class="category_content">
Mobiles
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-info-circle"></i>
</span>
<span class="category_content">
Graphics Cards
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-television"></i>
</span>
<span class="category_content">
Television
</span>
</li>
</ul>
</div>
</div>
In i tag you can use a class fa-fw, so all the icons has the same width
Example
<i class="fa fa-television fa-fw"></i>
add this class in all the i tags
.category_nav
{
height: 40px;
margin-top: 38px;
}
.category_nav_ul
{
list-style-type: none;
padding:0;
}
.category_nav_ul > li
{
display: inline-block;
}
#category_nav_ul_category
{
width: 380px;
cursor: pointer;
}
#category_nav_div
{
margin-top: 5px;
width: 380px;
position: absolute;
background-color: white;
padding-bottom: 10px;
}
#categories_content
{
margin-top: 10px;
}
.category_nav_div .content:hover
{
}
.categories
{
list-style: none;
}
.category
{
padding-top: 6px;
padding-bottom: 6px;
margin-bottom: 1px;
border: 0;
border-radius: 0;
}
.category:hover
{
border: 2px;
background:linear-gradient(to right, red 0px, red 3px, transparent 3px);
background-color: white;
border-top: 1px solid grey;
border-bottom: 1px solid grey;
}
.category_icon
{
width: 20px !important;
padding-right: 5px;
background-color: red;
}
.category_content
{
margin-left: 15px !important;
}
.light-border
{
border: 1px solid #e8e8e8;
border-top: none;
}
h2.flash_title
{
color: rgb(120, 120, 120);
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
background: #fff;
color: #666;
font-size: 14px;
padding-left: 19px;
font-weight: 400;
}
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div id="category_nav_div" class="light-border">
<div class="content" id="categories_content">
<ul class="categories list-group">
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-camera"></i>
</span>
<span class="category_content">
Camera
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-info-circle"></i>
</span>
<span class="category_content">
Clothes
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-mobile"></i>
</span>
<span class="category_content">
Mobiles
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-info-circle"></i>
</span>
<span class="category_content">
Graphics Cards
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-television"></i>
</span>
<span class="category_content">
Television
</span>
</li>
</ul>
</div>
</div>
Font-awesome has a class specially to do that. fa-fw
<div class="list-group">
<a class="list-group-item" href="#"><i class="fa fa-home fa-fw" aria-hidden="true"></i> Home</a>
<a class="list-group-item" href="#"><i class="fa fa-book fa-fw" aria-hidden="true"></i> Library</a>
<a class="list-group-item" href="#"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Applications</a>
<a class="list-group-item" href="#"><i class="fa fa-cog fa-fw" aria-hidden="true"></i> Settings</a>
</div>
http://fontawesome.io/examples/

How to get something inside wrapper 100% browser width

This is my problem,
I have a website with some content, and i want the header to be 100% width of the browser, and some content that's wrapped inside wrapper to make it about.. 50% of the browser width.
Then we have something like this:
But, we're adding a menu aswell. This is done with UL, and we cant just add the menu (i think), because the content of the menu is going to be in the wrapper. So it looks like this:
What have i tried?
I've given the element header/menu this css:
padding-left: 3000px;
margin-left: -3000px;
padding-right: 3000px;
margin-right: -3000px;
I also added overflow-x:hidden; on the body element so they cant scroll x wise. But on their phones, they can. So this makes everything "unresponsive"
HTML:
<html>
<title>Rocket League Prices - Home</title>
<body>
<div class="wrapper">
<header>
<a href="/index.php">
<div class="header-1">
Rocket League Prices
</div>
</a>
</header>
<ul class="nav-top">
<li class="nav-top"><a href="/index.php" title="HOME" class="nav-top">
<i class="fa fa-home fa-lg" aria-hidden="true" ></i><br><span class="meny-text">Home</span></a></li>
<li class="nav-top"><a href="/pc.php" title="PC PRICE LIST" class="nav-top">
<i class="fa fa-desktop fa-lg" aria-hidden="true"></i><br><span class="meny-text">PC list</span></a></li>
<li class="nav-top"><a href="/ps4.php" title="PS4 PRICE LIST" class="nav-top">
<i class="fa fa-gamepad fa-lg" aria-hidden="true"></i><br><span class="meny-text">PS4 list</span></a></li>
<li class="nav-top"><a href="/certified.php" title="CERTIFIED LIST" class="nav-top">
<i class="fa fa-certificate" aria-hidden="true"></i><br><span class="meny-text">Certified list</span></a></li>
<li class="nav-top" style="float:right;!important" >
<a href="#" class="nav-top meny-text" data-toggle="modal" data- target="#modal-staff">
<i class="fa fa-envelope-o" aria-hidden="true"></i> <br>Staff</a></li>
</ul>
<div class="modal fade" id="modal-staff" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
CSS:
body{
overflow-x: hidden;
}
header{
padding: 20px;
background-color: #1798e5;
color: black;
padding-left: 3000px;
margin-left: -3000px;
padding-right: 3000px;
margin-right: -3000px;
}
ul.nav-top {
background-color: white;
margin-left: auto;
margin-right: auto;
padding: 0;
margin-top: 0 auto;
float:left;
color: #34495e;
display:table-row;
text-align: center;
width: 100%;
margin: 0;
margin-bottom: 15px;
list-style-type: none;
padding-left: 3000px;
margin-left: -3000px;
padding-right: 3000px;
margin-right: -3000px;
}
li a.nav-top{
color: #34495e;
text-decoration: none;
padding: 20px 20px;
}
li a.nav-top:hover{
background-color: #f1f2f3;
color: #1798e5;
}
li.nav-top {
text-decoration: none;
float: left;
}
.wrapper{
max-width: 1000px;
margin-left: auto;
margin-right: auto;
}
CODEPEN: http://codepen.io/anon/pen/QdLpzM
Your html has to change a bit.
<html>
<title>Rocket League Prices - Home</title>
<body>
<header>
<div class="column">
<a href="/index.php">
<div class="header-1">
Rocket League Prices
</div>
</a>
</div>
</header>
<div class="column">
<ul class="nav-top ">
<li class="nav-top">
<a href="/index.php" title="HOME" class="nav-top">
<i class="fa fa-home fa-lg" aria-hidden="true"></i>
<br><span class="meny-text">Home</span>
</a>
</li>
<li class="nav-top">
<a href="/pc.php" title="PC PRICE LIST" class="nav-top">
<i class="fa fa-desktop fa-lg" aria-hidden="true"></i>
<br><span class="meny-text">PC list</span>
</a>
</li>
<li class="nav-top">
<a href="/ps4.php" title="PS4 PRICE LIST" class="nav-top">
<i class="fa fa-gamepad fa-lg" aria-hidden="true"></i>
<br><span class="meny-text">PS4 list</span>
</a>
</li>
<li class="nav-top">
<a href="/certified.php" title="CERTIFIED LIST" class="nav-top">
<i class="fa fa-certificate" aria-hidden="true"></i>
<br><span class="meny-text">Certified list</span>
</a>
</li>
<li class="nav-top" style="float:right;!important">
<a href="#" class="nav-top meny-text" data-toggle="modal" data-target="#modal-staff">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
<br>Staff</a>
</li>
</ul>
</div>
</body>
and your css
.column {
max-width: 1000px;
margin-left: auto;
margin-right: auto;
}
header {
padding: 20px 0;
background-color: #1798e5;
color: black;
width: 100%;
display: block;
}
ul.nav-top {
background-color: white;
padding: 0;
float: left;
color: #34495e;
display: table-row;
text-align: center;
width: 100%;
margin: 0;
margin-bottom: 15px;
list-style-type: none;
}
li a.nav-top {
color: #34495e;
text-decoration: none;
padding: 20px 20px;
}
li a.nav-top:hover {
background-color: #f1f2f3;
color: #1798e5;
}
li.nav-top {
text-decoration: none;
float: left;
}

make clickable area of <a> fill containing <div>

In the demonstration below, clicking the arrow in the small blue box opens a menu. But only clicking directly on the arrow itself will trigger the menu. How can I make a click anywhere in the small blue box open the menu?
I tried putting the <a> tag first, but the menu disappeared.
body {
margin-top: 50px;
}
ul.dropdown-menuoption {
top: auto;
background: #337ab7;
border-width: 0;
}
.prSemTA {
background: #337ab7;
border-radius: 3px;
font-size: 15px;
padding: 3px 5px 3px 4px
}
.prSemTA a {
color: #FFF;
text-decoration: none;
}
.prSemTA a:hover {
color: #333;
text-decoration: none;
}
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css" rel="stylesheet"/>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<div style="float:left;padding-left:5px;">
<div class="pull-left prSemTA">
<a href="" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="glyphicon glyphicon-chevron-down"></i>
</a>
<ul class="dropdown-menu dropdown-menuoption">
<li> <i class="glyphicon glyphicon-comment"></i> xxx</li>
<li><i class="glyphicon glyphicon-heart"></i> xxx</li>
<li><i class="glyphicon glyphicon-edit"></i> xxx</li>
<li><i class="glyphicon glyphicon-remove"></i> xxxx</li>
</ul>
</div>
</div>
View on JSFiddle
You can try below code:
.prSemTA {
background: #337ab7;
border-radius:3px;
font-size:15px;
}
.prSemTA a {
color: #FFF;
text-decoration: none;
display:block;
padding:3px 5px 3px 4px
}
Working Demo