473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 54387
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
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...
9
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...
3
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...
1
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...
10
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...
1
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...
3
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...
5
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,...
11
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.