#1
  1. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Dec 2004
    Posts
    3,008
    Rep Power
    376

    :last-child hassle?


    ok i must be doing something wrong but this isnt working in firefox (havent tested any other browser).

    Code:
          fieldset {
                margin-bottom: 5em;
                border: 1px solid black;
                padding: 1em;
                width: auto;
            }
            
            fieldset:last-child {
                margin: 0em !important;
            }

    [html]
    <form action="process.php" enctype="multipart/form-data" method="post">

    <fieldset>
    <legend>General</legend>
    ..... elements
    </fieldset>

    <fieldset>
    <legend>General</legend>
    ..... elements
    </fieldset>

    <fieldset>
    <legend>General</legend>
    ..... elements
    </fieldset>
    [/html]
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    well, is that fieldset actually the last child of the form element? If there's a submit button or something else below, the selector won't find anything.

    Maybe you mean :last-of-type?
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Dec 2004
    Posts
    3,008
    Rep Power
    376
    aah... i thought fieldset:last-child would mean "last child of field set"

    there is indeed a submit button...

IMN logo majestic logo threadwatch logo seochat tools logo