Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-11-2004, 09:06 PM   PM User | #1
kraftomatic
Regular Coder

 
Join Date: Jul 2003
Posts: 593
Thanks: 16
Thanked 0 Times in 0 Posts
kraftomatic is an unknown quantity at this point
CSS Hrlp

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.
kraftomatic is offline   Reply With Quote
Old 02-11-2004, 10:40 PM   PM User | #2
Skyzyx
Regular Coder

 
Skyzyx's Avatar
 
Join Date: Aug 2002
Location: Silicon Valley, CA
Posts: 980
Thanks: 0
Thanked 0 Times in 0 Posts
Skyzyx is on a distinguished road
You need to apply the styles to the input text boxes themselves for something like that to work.
__________________

Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.
Skyzyx is offline   Reply With Quote
Old 02-11-2004, 10:55 PM   PM User | #3
kraftomatic
Regular Coder

 
Join Date: Jul 2003
Posts: 593
Thanks: 16
Thanked 0 Times in 0 Posts
kraftomatic is an unknown quantity at this point
Right .. I must have the wrong syntax then .. what should I be doing?
kraftomatic is offline   Reply With Quote
Old 02-11-2004, 11:02 PM   PM User | #4
Nightfire
Senior Coder

 
Nightfire's Avatar
 
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Nightfire is on a distinguished road
I think this will do it

css:

.textbox{
width:40px;
height:40px;
}
__________________
Blue Panda
Website Design | 1 Pound Ads | 'ow much? | Coding Geeks
Nightfire is offline   Reply With Quote
Old 02-11-2004, 11:31 PM   PM User | #5
kraftomatic
Regular Coder

 
Join Date: Jul 2003
Posts: 593
Thanks: 16
Thanked 0 Times in 0 Posts
kraftomatic is an unknown quantity at this point
I tried that without any luck .. I tried it with and without a DIV around it ..
kraftomatic is offline   Reply With Quote
Old 02-11-2004, 11:54 PM   PM User | #6
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
Code:
<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?
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 02-12-2004, 12:41 PM   PM User | #7
kraftomatic
Regular Coder

 
Join Date: Jul 2003
Posts: 593
Thanks: 16
Thanked 0 Times in 0 Posts
kraftomatic is an unknown quantity at this point
Yep!

Thanks.
kraftomatic is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:49 PM.


Advertisement
Log in to turn off these ads.