Jump to content

[SOLVED] forms labels and css


purencool

Recommended Posts

I am having trouble get the labels and the text boxes to line up the display:block

will not let the textboxes stay on the same line. Even if I try to use display:inline using class inside the input box.

 

Can it be done using css?

body{
    font-family:"Arial","Georgia,Serif";
    font-size:16px
}

#wrapper{
    margin-left: auto;
    margin-right: auto;
    width: 600px;
}

/* adding css to form*/

#form67{
    display:block;
    width:200px;
    text-align:right;

}

fieldset {
border: 1px solid ;
width: 70%;
padding: 20px;
margin-left: auto;
margin-right: auto;
}

fieldset legend {
padding: 6px;
font-weight: bold;
}

 

the form

<form id="anniversary" name="anniversary" method="get" action="<?php echo $PHP_SELF;?>">
<fieldset>
                        <legend>Add A New User</legend>
                        <label  id="form67" for="firstName">First Name:</label>
                        <input   type="text" name="firstName"  id="firstName" size="30" maxlength="30" />
                        <label  id="form67" for="lastName">Last Name:</label>
                        <input   type="text" name="lastName"  id="lastName" size="30" maxlength="30" />
                        <label  id="form67" for="address">Address:</label>
                        <input type="text" name="address"  id="address" size="30" maxlength="30" />

                        <p><input type="submit" name="button" id="button" value="Submit" /></p>
                    </fieldset>
                </form>

Link to comment
https://forums.phpfreaks.com/topic/169029-solved-forms-labels-and-css/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.