Forums

Now on to css validation (5 posts)

  1. shadow
    Moderator
    Posted 5 years ago #

    Hi,
    Site: http://www.os42.com
    So I managed to sort out the xhtml validation for my page but now I am looking into the css validation and have hit a big snag with this one:-
    textarea {
    width: cols="70";
    border: 1px solid #ccc;
    background-color: #fffef1;
    }

    The width reference was put in to stop the comment box from opening right across the page. However, the W3C css validator pumps out this error message
    Line: 0 Context : textarea
    Invalid number : widthcols is not a width value : cols
    Line: 0 Context : textarea
    Parse Error - cols="70";
    Line: 0
    Parse Error - : 1px solid #ccc; background-color: #fffef1; } #commentlist
    Has anyone else had this problem? I gather there must be a different way of making the textarea stay within the body of the page.

  2. podz
    Support Maven
    Posted 5 years ago #

    Tried a percentage ?

  3. shadow
    Moderator
    Posted 5 years ago #

    Thanks Podz - seems to have done the trick - it doesn't work if you have " " around it though, if anyone should try it.
    Just keep it as width: 70%;
    Slowly but surely the world begins to spin again....:):)

  4. Beel
    Member
    Posted 5 years ago #

    A width percentage in the css will not work for IE. I have been forced to rely solely on setting cols="70" in the tag.

  5. Millennium
    Member
    Posted 5 years ago #

    Try "width:70ex" instead. That should approximate the "cols='70'" thing you were using.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.