...

View Full Version : CSS help



kraftomatic
02-11-2004, 10:06 PM
Hey All,

I have a style sheet with the follow code from an HTML page:

<div id="contactBox">
<table border="0" cellpadding="1" cellspacing="0">
<form action="<%=SCRIPT_NAME%>" method="post" name="comment_form">
<tr><td>Name:</td><td><input type="text" size="30" name="name" class="textbox" value="<%=name%>"></td></tr>
<tr><td>Email:</td><td><input type="text" size="30" name="email" class="textbox" value="<%=email%>"></td></tr>

<input type="submit" name="submit" value="Submit" class="button">
</td></tr>
</form>
</div>

My stylesheet:

#contactBox {
color: #fff;
font-size: 9px;
}

What I'm trying to do is make the textboxes smaller. I've done this on another page that doesn't use CSS as extensively. I've tried putting the table within a DIV tag and that doesn't seem to work. Any ideas? I'm sure it's something simple.

Thanks.

Skyzyx
02-11-2004, 11:40 PM
You need to apply the styles to the input text boxes themselves for something like that to work.

kraftomatic
02-11-2004, 11:55 PM
Right .. I must have the wrong syntax then .. what should I be doing?

Nightfire
02-12-2004, 12:02 AM
I think this will do it

css:

.textbox{
width:40px;
height:40px;
}

kraftomatic
02-12-2004, 12:31 AM
I tried that without any luck .. I tried it with and without a DIV around it ..

oracleguy
02-12-2004, 12:54 AM
<style type="text/css">
#contactBox input {
font-size: 90%;
}
</style>

...

<div id="contactBox">

<input type="text" name="email" value="" size="30" />

</div>


Is that what you are going for?

kraftomatic
02-12-2004, 01:41 PM
Yep!

Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum