Tips for resizing gridview button without affecting the size of the input textbox

I'm currently exploring options to customize the command column gridview buttons so they have consistent sizes. I've applied a CssClass to the gridview as shown below:

.gvbutton input {
 width: 79px;
 height: 28px;

}

The issue I'm facing is that while this code ensures my command column buttons are uniform in size, it also limits the length of text in the edit textbox to 79px. Is there a way to apply the CSS only to the button and not affect the textbox?

Answer №1

I'm not very familiar with asp.net, but my suggestion would be to give this a shot:

.gvbutton input[type="submit"] {
 width: 79px;
 height: 28px;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Using HTML and CSS to create nested divs floating to the left while also incorporating a

I'm trying to create a simple effect where a fixed height and width div contains a series of child divs that can be scrolled horizontally. However, the children are not floating as expected in the following code: .a {width:200px; height:200px; ...

What is the method for inserting a line break following an input element using CSS?

I am utilizing a service that provides me with dynamic HTML containing labels and inputs as shown below: input:after { content: "\a"; white-space: pre; } <label for="username">Username</label> <input type="text" id="username" nam ...

Is there a way to ensure SubmitChanges only submits a specific change and not the entire list of previous changes made?

When utilizing the ASP.NET LINQ SubmitChanges method, it is important to note that it commits changes for all previous database modifications made since the last time it was called. In a specific scenario, an example code snippet would look like this: Cl ...

Embrace the power of generic inheritance

Is there a way to properly inherit a class with the following structure and override a method within it? I've attempted various methods but I'm still struggling with the syntax, particularly the parameters TUser and TKey. How can classes with sim ...

Retrieve database information within a partial view, specifically an .ascx file that is integrated into the Site.Master layout in asp.net mvc

Hey, I'm running into an issue with my asp.net mvc 2 application. I have a partial view called menu.ascx that is included on all the pages of my site in the Site.Master masterpage. My goal is to have the menu change based on the type of user accessing ...

What is the best way to adjust the font weight of a Bootstrap 4 modal header?

Is there a way to adjust the font weight in the header of a Bootstrap 4 modal? As an added challenge, I'm also interested in changing the font color to #7f7f7f... <div class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" r ...

How can I extract a list of values from an array containing blittable structs?

I have a set of blittable structures in an array, each of which is of fixed size and stored sequentially in memory. My goal is to extract multiple arrays from this single array of structures. Below is the structure definition: [Serializable] public struct ...

Having trouble making the image appear in a relative position

I am struggling to figure out why my figcaption is not positioning correctly. My image is set to relative position. Meanwhile, my figcaption has been set to absolute positioning. This should mean that the figcaption with a bottom: 60px should be positio ...

A popular method for showing a div when another div is scrolled out of view, similar to the Timeline feature on Facebook

I have found Facebook's new timeline feature to be quite impressive. I particularly like the small menu that appears as you scroll down a profile, offering options to view the timeline or more information about the user. It only shows up when you reac ...

Is there a way to retrieve a collection of only the edited rows on a Silverlight 2 datagrid?

Is it possible to selectively send only the modified rows from my silverlight 2 control back to the WCF service for updating after a user clicks 'Submit'? I currently load data into my grid using the WCF service. ...

What steps can be taken to enable users to send and receive messages on my chat website?

I just completed creating a chat website using HTML, CSS, JavaScript, and jQuery and have now published it. You can view it at However, the site still lacks the functionality that would allow users to send and receive messages through it. Can anyone prov ...

What methods can I use to ensure that images remain at the forefront without relying on Z-Index?

My website design includes a feature where an image pops up next to an underlined word when hovered over. The issue is that the images are supposed to always be on top, but the underlined words are appearing over them. I suspect there is a conflict in the ...

asp.net random user details

While utilizing asp.net's built-in membership provider, what is the method to store customized user information when using the CreateUserWizard control? For instance, if my application includes three user types: Student, Teacher, and Staff. I aim to ...

Ensure the heading expands to fit the container and include > at the conclusion

Could anyone help me create a heading effect link similar to the one on BBC's website at ? I'm specifically looking to achieve an effect where the heading text is on the left and an arrow is displayed on the right. Additionally, I would like both ...

What is the best method for adding space between elements in flexbox layout?

I am struggling to align the child flexboxes within my parent flexbox in a single row, both vertically and horizontally centered. I want to add space between them using the gap property in CSS, but the images and embedded videos inside these child flexboxe ...

Introducing the WWW-Authenticate header results in an issue arising

Having trouble setting up basic access authorization on my .NET HttpListener. Despite trying various solutions from different sources, I keep encountering the same error. My objective is to have admin/admin as the username/password for basic authenticatio ...

Moving images displayed on a webpage

Is animating 5 pictures/photos a simple task? Take a look at this example: Which programming languages are recommended for achieving this effect? Thank you Tea ...

Ways to create distance between a border and an object placed within it

I have a Widget that I created using HTML & CSS, and it looks good. However, I am struggling to add some space between the inside elements and the border line. Can someone please assist me with this? .solid { border-style: solid; } <div class="solid" ...

Creating a stylish look for a selection of multiple menu options

option:active { color: red; } option:focus { color: green; background: green; } option:checked { color: yellow; background: yellow; } <select multiple> <option>One</option> <option>Two</option> <option&g ...

What is the most effective way to utilize in-memory services in web applications?

Considering the need to implement an in-memory service for a high-load read/write system, I am exploring how to dump object results every 2 minutes. In order to access the in-memory objects/data within a web application, would it be feasible to have a Wind ...