W3C home > Mailing lists > Public > www-validator-css@w3.org > February 2009

Floats need explicit width??

From: Paul McKeown (Tiscali) <ppjmckeown@tiscali.co.uk>
Date: Fri, 13 Feb 2009 00:39:43 +0000
Message-ID: <BAY116-DAV9C04918B0B1574B37311B91B80@phx.gbl>
Message-ID: <4994C14F.6060100@tiscali.co.uk>
To: www-validator-css@w3.org
Dear W3C,

I have used your validators for a long time and have always thought them 
excellent tools.

However, the following CSS 2.1 code fragment, has started generating a 
warning, which it never seemed to generate before (unless I have been 
particularly inobservant).  The fragment is:

    #navbar li {
        /* position the navigation tabs by floating them left */
        float: left;
        /* space out the tabs by applying a right margin */
        margin-right: 0.3em;
        /* remove the bullet */
        list-style: none;
        font-size: 90%;
        font-weight: normal;

The warning is:

    In (x)HTML+CSS, floated elements need to have a width declared. Only
    elements with an intrinsic width (html, img, input, textarea,
    select, or object) are not affected

However, I thought that that is not true.  To quote the W3C 

      C.2.50  Section 9.5 Floats

Floats are no longer required to have an explicit width.

Am I losing my mind or is the css validator suddenly bonkers?  Please help!

Best Regards,
Paul McKeown.
Received on Friday, 13 February 2009 08:29:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:01:04 UTC