Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 01-22-2012, 12:54 AM   #1
New Member
 
Join Date: Jan 2012
Location: CyberSpace
Posts: 9
Default Display 3 Checkboxes From Left to Right

hello pros,

i am wanting to create my own classified ads website

im starting to learn basic html, i've started to practice and started creating a sample form.

i want to display 3 checkboxes in an inline display, from left to right.

how do i do that? coz right now it displays from top to bottom

here is what i did

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <title>My Practice Sheet</title>
  <style type="text/css">
    body {
      font-family: Verdana, sans-serif, sans;
      background-color: #dddddd;
    }
    .spacer {
      height: 200px;
      margin: 0px;
    }
    td.label{
      text-align: right;
    }              
  </style>
  </head>
  <body><div class="spacer"></div>
    
    <div align="center">
      <form><table>
        <tr>
          <td class="label">City or Provinces:&nbsp;</td>
          <td>
            <select name="city_dropdown" maxlength="30">
              <option value="abra">Abra</option>
              <option value="benguet">Benguet</option>
              <option value="cagayanval">Cagayan Valley</option>
              <option value="spacer"></option>
              <option value="entirephil">Entire Philippines</option>
            </select>  
          </td>
       </tr>
       
       <tr>
        <td class="label">Section:&nbsp;</td>
        <td>
          <select name="section">
            <option value="choose" selected="selected">Select Section</option>
            <option value="spacer"></option>
            <option value="items_forsale">Items For Sale</option>
            <option value="want_to_buys">Want To Buys</option>
            <option value="swap">Swapping Section</option>
            <option value="properties">Properties</option>
            <option value="room_finder">Room Finder</option>
          </select>
        </td>
       </tr>
       
       <tr>
        <td class="label">Listing Title:&nbsp;</td>
        <td>
          <input type="text" name="listing_title" value="" size="66" max-lenght="60"/>
        </td>
       </tr>
       <tr>
        <td style="vertical-align:top;">Listing Description:&nbsp;</td>
        <td>
         <textarea rows="10" cols="50"></textarea>
        </td>
       </tr>
       
       <tr>
        <td class="label">Item Condition:&nbsp;</td>
        <td align="left">
        
          <fieldset style="width:33%;"><input type="checkbox" name="brand_new" value=""/>&nbsp;Brand New</fieldset>
          <fieldset style="width:33%;"><input type="checkbox" name="already_used" value=""/>&nbsp;Already Used</fieldset>
          <fieldset style="width:33%;"><input type="checkbox" name="newly_replaced" value=""/>&nbsp;Newly Replaced</fieldset>
        </td>
       </tr>
       
   </table>
   </form>
 </div> 

</body>
</html>
cosmicx is offline   Reply With Quote


Old 01-22-2012, 02:28 AM   #2
Platinum Member
 
ronaldroe's Avatar
 
Join Date: Jan 2011
Location: Oklahoma City, OK
Posts: 677
Send a message via Skype™ to ronaldroe
Default

Set a class for the <option> tag, and set the CSS as float:left;
__________________
Ronald Roe
Small Business Web Design
ronaldroe is offline   Reply With Quote
Old 01-27-2012, 03:38 AM   #3
New Member
 
Join Date: Jan 2012
Location: CyberSpace
Posts: 9
Default

Quote:
Originally Posted by ronaldroe View Post
Set a class for the <option> tag, and set the CSS as float:left;

any demo codes?

the <option> tags were for the <select> tag, the drop down menu? my check boxes were enclosed in a <fieldset> and there is no <option> tag in there.
cosmicx is offline   Reply With Quote
Reply

Tags
basic html, form field checkbox, input elements

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:51 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.