SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2003
    Location
    UK
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS formating of forms not working in Netscape 6.2

    Hello,

    I have purchased the "Designing without tables using CSS" book. I have implemented an example in the book in Chapter 6 pages 129 and 130. It relates to using the float and clear attributes to position form elements without tables.

    It is designed such that the form labels appear to the left of the form elements without requiring the use of tables. I have reproduced the code exactly as it is in the book.

    http://www.test.customerdemo.com/css-form-problem.htm

    Unfortunately, the above works fine in IE6 but in Netscape 6.2 the labels are not visible.

    The CSS for the above is:

    form p {
    width: 50%;
    clear: both;
    }

    form p label{
    float: left;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: xx-small;
    font-weight: bold;
    }

    form p input, form p textarea, form p select {
    float: right
    }

    The HTML part for the form is:

    <form action="" method="post" name="form1" >
    <p>
    <label for="name">Name/label>
    <input name="name" type="text" id="name">
    </p>
    <p>
    <label for="address">Address/label>
    <textarea name="address" cols="30" rows="5" id="address"></textarea>
    </p>
    <p><label for="country">Country/label>
    <select name="country" id="country">
    <option>UK</option>
    <option>USA</option>
    <option>France</option>
    <option>Germany</option>
    <option>Colombia</option>
    </select>
    </p>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>

    Can anyone help. I can confirm that both the HTML code and the CSS style sheet both pass the W3 validation checks.

    Thanks in advance

    Vince De Mello

  2. #2
    Forensic SEO Consultant Webnauts's Avatar
    Join Date
    Jun 2003
    Location
    European Union
    Posts
    1,488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I checked the page http://www.test.customerdemo.com/css-form-problem.htm

    The only thing I can tell is, that the "action" attribute has an invalid attribute value "". Try using one of the following values: an alphanumeric string or a string.

    Let me know if this helped or not.

  3. #3
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like http://bugzilla.mozilla.org/show_bug.cgi?id=96813: (<label> elements do not respond correctly to styles)

    It should be fixed in more recent versions of netscape (7.01+, I think, and maybe 7.0, too) and mozilla (1.0.1 and 1.1 onwards)


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
  •