Reputation: 443
I want to align the 2 social icons exactly in the center. And actually to do that I want to set to the twitter icon the width value of 80px
, but I can't do it. I only manage to do that in the browser editor; I can't seem to select the right class and element.style
overides it whatever I do. What is this?
element.style {
width: 110px;
height: 20px;
}
I don't wont to wrap the whole button to change the size (or should I?). The code that should be working is this:
.twitter-share-button { vertical-align:top;
margin-left:10px; width: 80px;}
Upvotes: 15
Views: 9896
Reputation: 1422
Try using a local style on the button itself, by using the style attribute:
style = "width: 80px;"
the local style should overwrite it.
Upvotes: 0
Reputation: 36712
In Chrome's developer tools element.style
shows any inline styles that are applied to the selected element.
To override them use !important
So to set the button width to 80px you could use:
.twitter-share-button {
width: 80px !important;
}
Upvotes: 35