Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: CSS help

  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Right .. I must have the wrong syntax then .. what should I be doing?

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    I think this will do it

    css:

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

  • #5
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts
    I tried that without any luck .. I tried it with and without a DIV around it ..

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    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

  • #7
    Regular Coder
    Join Date
    Jul 2003
    Posts
    600
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Yep!

    Thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •