473,770 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Input Button Width in a style sheet.

Howdy All,

I am trying to standardize all the buttons on a site by using a style
sheet to specify their height, width, background all those things. But
I can seem to get the simplest of things to work. Below I have put a
simple page with an Input type of button. Can somebody tell me what I
am doing wrong?

<HTML>
<HEAD>
<TITLE></TITLE>
<STYLE type="text/css">
button-standard{
WIDTH: 200px;}
</STYLE>
</HEAD>
<BODY>

<input type="button" value="Hello" style="button-standard">

</BODY>
</HTML>
Thanks

dbl

Jul 21 '05 #1
2 54406
Els
DBLWizard wrote:
Howdy All,

I am trying to standardize all the buttons on a site by using a style
sheet to specify their height, width, background all those things. But
I can seem to get the simplest of things to work. Below I have put a
simple page with an Input type of button. Can somebody tell me what I
am doing wrong?

<HTML>
<HEAD>
<TITLE></TITLE>
<STYLE type="text/css">
button-standard{
WIDTH: 200px;}
</STYLE>
</HEAD>
<BODY>

<input type="button" value="Hello" style="button-standard">

</BODY>
</HTML>


Replace style="button-standard" by class="button-standard", and prefix
the style selector with a '.'

Like so:
<style type="text/css">
..button-standard{
width:200px;
}

The '.' stands for class. If you'd use an id instead of a class, the
style selector should start with a '#' instead of a '.'
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Squeeze - Dr. Jazz
Jul 21 '05 #2
Ohhhhh man do I feel stupid ... I have been stairing at this for tooooo
looonnnnggg.

Thanks

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5177
by: KathyB | last post by:
Hi, I'm trying to find a way to validate input text boxes where I don't know the names until the page is rendered. I've got 2 validate functions that fire with the onsubmit button of a "mini" form within the html document. When the Finish button is clicked, I need to check for any empty input boxes before loading the next aspx page...but it could be no boxes or five boxes, etc.? I've included my html output...if you have any ideas,...
9
15769
by: Per Steffensen | last post by:
Hi I have the following in my html: <input type="button" value="Short"/> <input type="button" value="Very long text on this button"/> It gives two buttons on the html form. My problem is that in IE the length, from where the text on the botton starts/ends (horisontally) to the border of the button, depends on the length of the text on the
3
12936
by: Ben | last post by:
Here's my form: <form name="aForm" method='post'> <input type=file name=file1 onkeypress='KeyPress()'><br> <a id='attachMoreLink' href='javascript:AddFileInput()">Attach More Files </a> <input type=submit value='Done'> </form>
1
7864
by: NullBock | last post by:
Hi, I'm trying to create a form with a text-input (not textarea) that expands to the size available, using CSS. I thought that a simple display:block would work: <form> <div> <input type="text" style="display: block"> </div>
10
3087
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page like it tried to do it but errored... I thought changeing the max size for the file input box to about 100mb would fix it but nope here is my page code and my code behind code... ===============
1
2781
by: S. David Kyle | last post by:
I am having a weird issue when I generate an input Html tag from a Xsl transformation. When the trasform is executed on the xsl below, the <inputtag has the closing slash removed in the first case and the closing tag removed in the second case. As a side note, if I change <inputto <input1>, the closing tag does not get removed.
3
4011
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table with a createElement function to add additional entries. The table has the first row of input text boxes already in it. You have to click a button to add another row. That seems to be working fine. How do I pull the information from the input boxes...
5
2298
by: The Devil | last post by:
Hi, This is not just a simple input form made with javascript. This is the code: <html><head> <script language="JavaScript"> var i=0; function add(inputEvent, inputDur, inputCode, placeEvent, placeDur, placeCode, placeDel, elmnt, inputButton) {
11
12423
by: Mike Harrison | last post by:
Hi, I have some simple HTML like this: <div id="container" style="width:100%;"> <input type="text" <input type="button" style="float:right;" value="Click here..."> </div> I want the button to remain the normal size and be right-aligned, and the edit box to automatically take up the remaining width of the container.
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.