Site logo

Archived topic

button widths

3 replies · Started by Cynthia on January 2, 2022

Viewing posts 1–4 of 4

I've created a simple button in the GP theme and applied some CSS, however when I apply a px width in the CSS nothing happens. I have 3 buttons on the home page, set to the same exact class. RESEARCH & DEVELOPMENT, MANUFACTURING, PRODUCT DESIGN. I want the Manufacturing & Product Design buttons to be the same width size as the Research & Development button. Website is attached below.

This is the element code I'm using:

<p style="text-align: center; font-family: Roboto,Helvetica,Arial,Lucida,sans-serif; font-size: 18px; color: #0f517d; letter-spacing: 2px; font-weight: 100;"><span style="font-family: Roboto; font-weight: 300;">MANUFACTURING <i class="fas fa-long-arrow-alt-right"></i></span></p>

Here's the CSS I'm using

.rdbutton {
border: 1px solid #59595b;
background: -webkit-gradient(linear, left top, left bottom, from(#002f4d), to(#001726));
background: -webkit-linear-gradient(top, #002f4d, #001726);
background: -moz-linear-gradient(top, #002f4d, #001726);
background: -ms-linear-gradient(top, #002f4d, #001726);
background: -o-linear-gradient(top, #002f4d, #001726);
background-image: -ms-linear-gradient(top, #002f4d 0%, #001726 100%);
color: #a8a8a8;
font-size: 17px;
font-family: lato, serif;text-decoration: none;
vertical-align: middle;
padding:20px 20px 20px 20px;
height:0px;
width:366px;
}

Hi there,

add this property to your CSS:

display: inline-block;

Please note that fixed width elements can cause horizontal overflow on smaller screens. So you should be careful adding that style to ant screen size.

That works. Thank you David!

You're welcome

This archived topic is closed to new replies.