I want the following field and button to be the same size to look uniform and straight across...not sure how I would do this...please help!
Thanks, any help would be greatly appreciated!
| SitePoint Sponsor |
I want the following field and button to be the same size to look uniform and straight across...not sure how I would do this...please help!
Thanks, any help would be greatly appreciated!


Possibly change the font-size of the input button?
Where your input button has a class of submit:
10px may be too small, but try playing with the number. Just a suggestion, may not work, and I haven't tried it. Usual disclaimers etc...Code:input.submit { font-size:10px }
Recommended Reading:
Why we won't help you - An article by Mark Pilgrim.
http://www.zopester.com - Coming Soon!


There are various ways however using the CSS height and width properties should be a fairly safe solution if you what those two controls to be the same height and width.
<style type="text/css">
<!--
input {width: 100px; height: 200px;}
-->
</style>
Last edited by xhtmlcoder; Mar 26, 2003 at 05:01.
};-) http://www.xhtmlcoder.com/
Thinking Web: Voices of the Community
> March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?
What if your input is a checkbox or radio button?Originally Posted by xhtmlcoder
checkboxes and radio buttons are the most difficult ones to style...in most cases, it's not even worth trying, as most attributes are not supported or don't affect them in the way you would think they do...
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com


Observably I were referring to the image in question and you'd use the 'class', or 'id' if there was the necessity, or apply the CSS "Attribute Selectors" which as far as I can recall fail in Micro$oft IE.
Actually you'd get some quite interesting results if you added width and height dimensions to a checkbox, well you certainly do in the early Mozilla since the checkbox and radio button would grow to those dimensions, thus in practice you can end-up with giant checkboxes, have fun:
As Redux implied radio buttons can be finicky beasts to style, the last time I began messing with radio buttons and colour states via CSS was a couple of years back, and I totally agree the results are not always what you expectCode:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Hmmm Big</title> <style type="text/css"> <!-- input { color: white; background-color : gray; width : 100px; height : 100px; --> </style> </head> <body> <form action="#" method="post" id="myForm"> <input type="radio" name="choice" /> <input type="checkbox" value="submit" /> <input type="submit" value="submit" /> <input type="reset" value="reset" /> </form> </body> </html>...
Last edited by xhtmlcoder; Mar 26, 2003 at 12:40.
};-) http://www.xhtmlcoder.com/
Thinking Web: Voices of the Community
> March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?
Bookmarks