SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2002
    Location
    Ljubljana, Slovenia
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    form layout without tables and divs

    Is it possible to make form layout just using <label> and <input> tags an some CSS and no tables. I guess only that way a forms layout would truely seperated from content. It's funny how rarely a <label> tag is used. I should note that I would like all <input> fields to be aligned,

    /* HTML */

    <form>
    <label>First Name/label>
    <input name="firstname">

    <label>Last Name/label>
    <input name="lastname">

    <input type="submit" name="submit" value="OK">
    </form>


    /* CSS */

    label {
    width: 100px;
    text-align: right;
    vertical-align: top;
    font-family: Verdana;
    font-size: 10px;
    font-weight: bold;
    }

    This technique does not work in IE in Opera. Width, Padding-Top and others are not applied to <label>.

    Does anybody have any ideas?

    Blaz

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you tried styles on the other elements? <form>and<input>?
    without know what it is exactly you want to try and do... i can only suggest that.

    good luck.


Bookmarks

Posting Permissions

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