• 0

cant get my CSS to play ball on my form labels!


Question

Hi guys,

please tell me what im doing wrong, my style (#maincontent_frost_contact form label {) for my labels just do0esnt seem to take to them at all. i have 2 issues.

1. unable to set a widtth to the labels so they are nice and neat

2. my font style (Tahoma) doesnt seem to want to render in browser, even though its shows my tahoma in designview.

Any ideas? http://lensart.me.uk/contact.html

Hoping someone can show me the error of my ways

Cheers

RAM

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

First point: Don't rely on designview, ever. Just use actual browsers to view the actual site in action.

 <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">

Your form has the ID "form1" so you should be using that in your CSS.

form#form1 label {
        width: 100px;
}

Where are you not seeing tahoma being rendered? I'm viewing your site and I see tahoma being used for everything but the forms. If you want tahoma to be included in your form you will need to do the following:

form#form1 input, form#form1 textarea {
       font-family: tahoma, verdana, arial, sans-serif;
}

Link to comment
Share on other sites

  • 0

First point: Don't rely on designview, ever. Just use actual browsers to view the actual site in action.

 <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">

Your form has the ID "form1" so you should be using that in your CSS.

form#form1 label {
        width: 100px;
}

Where are you not seeing tahoma being rendered? I'm viewing your site and I see tahoma being used for everything but the forms. If you want tahoma to be included in your form you will need to do the following:

form#form1 input, form#form1 textarea {
       font-family: tahoma, verdana, arial, sans-serif;
}

thanks +Cupcakes

Link to comment
Share on other sites

  • 0

Your code is the problem.

 <label>Name:
      <input type="text" name="name" id="name" />

    </label>

That's wrong. You do no include the input in your label.

 <label>Name:</label>
      <input type="text" name="name" id="name" />

http://dev.icupcake.org/neowin/ratm.html

My example code works there.

Thanks, very helpful post, and example. (Y)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.