Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't change the twitter button width

Tags:

css

twitter

http://boutique40.com/

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;}
like image 435
a.litis Avatar asked Mar 05 '12 13:03

a.litis


People also ask

How do you change the height and width of a button?

Editing the size of a button in HTML is relatively easy. In the simplest form you just have to add a 'style' attribute to the button element containing your desired height and width values in pixels. It goes something like this. Alternatively, you can add a 'class' to button and add your styles in a CSS file.

How do I change the size of a button in CSS?

To change the font size of a button, use the font-size property.


1 Answers

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;
}
like image 160
Turnip Avatar answered Sep 18 '22 15:09

Turnip