dcsimg
www.webdeveloper.com
Results 1 to 13 of 13

Thread: I've got valid CSS...

  1. #1
    Join Date
    Nov 2004
    Location
    Lisboa, Portugal
    Posts
    71

    I've got valid CSS...

    I got my w3c CSS validation without errors, however i'm having a rough time with html.

    I'm trying to get my Index (for starters) approved using:

    http://bobby.watchfire.com

    I'd appreciate some pointers on some of the unsolved problems i'm having.

    As for the layout:

    I think the layout is still missing something, i just don't know what yet, some opinions would be very welcome.

    thx in advance

  2. #2
    Join Date
    Aug 2004
    Location
    United Kingdom, Northamptonshire
    Posts
    109
    W3C HTML Validator Results

    This tells you whats wrong.

    Hope that helps.

  3. #3
    Join Date
    Aug 2004
    Location
    United Kingdom, Northamptonshire
    Posts
    109
    I would put some boxes around the main text? So it looks neater and you can plainley see where one ends and another begins. I know its totally obvious when they end and begin, but its just how I would have it.

    But the layout looks pretty good in my view, navigations are easy to see and use, and the content is not all over the place.

    Nice site there

  4. #4
    Join Date
    Sep 2004
    Location
    The Hereandnow
    Posts
    168
    coding errors:
    Needs a charset to get validated by w3

    http://www.w3.org/TR/REC-html40/charset.html

    i put this charset in your code...

    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

    ...and got this error report...

    Encoding: iso-8859-1
    Doctype: HTML 4.01 Transitional
    Errors: 55

    This page is not Valid HTML 4.01 Transitional!
    Below are the results of attempting to parse this document with an SGML parser.

    Line 25, column 42: end tag for element "A" which is not open

    <div id="topo3"><h2>corfebol.no.sapo.pt</a></h2></div>

    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occured in a script section of your document, you should probably read this FAQ entry.



    Line 37, column 15: character "\" not allowed in attribute specification list

    </ul></div><br \>



    Line 44, column 16: character "\" not allowed in attribute specification list

    </div></div><br \>



    Line 46, column 9: ID "BOXBORDER" already defined

    <div id="boxborder">

    An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hock for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).



    Line 40, column 9: ID "BOXBORDER" first defined here

    <div id="boxborder">

    Line 47, column 9: ID "BOX" already defined

    <div id="box">



    Line 41, column 9: ID "BOX" first defined here

    <div id="box">

    Line 55, column 37: character "\" not allowed in attribute specification list

    <label for="nome">Nome</label><br \>



    Line 56, column 100: character "\" not allowed in attribute specification list

    ... nome." size="20" maxlength="35"><br \><br \>



    Line 56, column 106: character "\" not allowed in attribute specification list

    ..." size="20" maxlength="35"><br \><br \>



    Line 57, column 40: character "\" not allowed in attribute specification list

    <label for="email">E-Mail</label><br \>



    Line 58, column 103: character "\" not allowed in attribute specification list

    ...email." size="20" maxlength="35"><br \><br \>



    Line 58, column 109: character "\" not allowed in attribute specification list

    ..." size="20" maxlength="35"><br \><br \>



    Line 62, column 16: character "\" not allowed in attribute specification list

    </div></div><br \>



    Line 64, column 114: character "\" not allowed in attribute specification list

    ...sapo.pt/core/js/fav.js"></script><br \><br \>



    Line 64, column 120: character "\" not allowed in attribute specification list

    ...t/core/js/fav.js"></script><br \><br \>



    Line 70, column 54: character "\" not allowed in attribute specification list

    <h4>Jantar de Natal</h4><div><a name="408551"></a><br \>



    Line 74, column 59: character "\" not allowed in attribute specification list

    Não são admitidas distracções! Prenda é prenda!!!</div><br \>



    Line 76, column 4: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>dezembro 11, 2004</h3>



    Line 76, column 10: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>dezembro 11, 2004</h3>



    Line 76, column 16: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>dezembro 11, 2004</h3>



    Line 77, column 66: character "\" not allowed in attribute specification list

    ...Taça de Portugal</h4><div><a name="403737"></a><br \>



    Line 84, column 66: character "\" not allowed in attribute specification list

    ...iremos fazer história no nosso clube?</p></div><br \>



    Line 86, column 4: character "\" not allowed in attribute specification list

    <br \><br \><br \></div>



    Line 86, column 10: character "\" not allowed in attribute specification list

    <br \><br \><br \></div>



    Line 86, column 16: character "\" not allowed in attribute specification list

    <br \><br \><br \></div>



    Line 87, column 73: character "\" not allowed in attribute specification list

    ...iraflores</h4><div><a name="403735"></a><br \>



    Line 89, column 14: character "\" not allowed in attribute specification list

    </p></div><br \>



    Line 91, column 4: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>dezembro 04, 2004</h3>



    Line 91, column 10: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>dezembro 04, 2004</h3>



    Line 91, column 16: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>dezembro 04, 2004</h3>



    Line 92, column 85: character "\" not allowed in attribute specification list

    ...es</h4><div><a name="395706"></a><br \>



    Line 93, column 132: character "\" not allowed in attribute specification list

    ...quecer das novas meias!!! </p></div><br \>



    Line 95, column 4: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>novembro 24, 2004</h3>



    Line 95, column 10: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>novembro 24, 2004</h3>



    Line 95, column 16: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><h3>novembro 24, 2004</h3>



    Line 96, column 62: character "\" not allowed in attribute specification list

    ...-vindo ao novo site.</h4><div><a name="392909"></a><br \>



    Line 97, column 410: character "\" not allowed in attribute specification list

    ...=gbook.html">clique aqui.</A></p></div><br \>



    Line 99, column 4: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><br \>



    Line 99, column 10: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><br \>



    Line 99, column 16: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><br \>



    Line 99, column 28: character "\" not allowed in attribute specification list

    <br \><br \><br \></div><br \>



    Line 101, column 96: character "\" not allowed in attribute specification list

    ...o/2004_12.html">dezembro 2004</a><br \>



    Line 102, column 91: character "\" not allowed in attribute specification list

    ...o/2004_11.html">novembro 2004</a><br \>



    Line 104, column 10: character "\" not allowed in attribute specification list

    </div><br \><br \><br \>



    Line 104, column 16: character "\" not allowed in attribute specification list

    </div><br \><br \><br \>



    Line 104, column 22: character "\" not allowed in attribute specification list

    </div><br \><br \><br \>



    Line 107, column 37: "SCRIPT" is not a member of a group specified for any attribute

    <script language="JavaScript" script type="text/javascript" src="http://pagead2.



    Line 107, column 135: character "\" not allowed in attribute specification list

    ...com/pagead/show_ads.js"></script><br \><br \>



    Line 107, column 141: character "\" not allowed in attribute specification list

    ...gead/show_ads.js"></script><br \><br \>



    Line 109, column 10: character "\" not allowed in attribute specification list

    </div><br \>



    Line 111, column 9: ID "NAVCONTAINER" already defined

    <div id="navcontainer"><ul id="navlist">



    Line 27, column 9: ID "NAVCONTAINER" first defined here

    <div id="navcontainer"><ul id="navlist">

    Line 111, column 31: ID "NAVLIST" already defined

    <div id="navcontainer"><ul id="navlist">



    Line 27, column 31: ID "NAVLIST" first defined here

    <div id="navcontainer"><ul id="navlist">


    ...fix these and youll be well on your way.

    usability:
    links in the menu of the page you are already on should be disabled to prevent visitors accidentally clicking on the link and reloading the page they were already on, annoying them and wasting their time. the menu buttons are a good size to be usable, rollover state clear.

    layout:
    looks fine to me. the header section is perhaps a bit big but it doesnt get in the way of the content so its not a problem. images are nice, especially with the logo over the top. color scheme is good. i wouldnt change anything about the layout.

  5. #5
    Join Date
    Nov 2004
    Location
    Lisboa, Portugal
    Posts
    71
    thx for the help, it was very useful.

    I only have 1 more error to solve:

    i have the menu appearing twice on the page, so i'm getting:

    Line 107, column 9: ID "NAVCONTAINER" already defined

    <div id="navcontainer"><ul id="navlist">

    An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hock for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).



    Line 26, column 9: ID "NAVCONTAINER" first defined here

    <div id="navcontainer"><ul id="navlist">

    Line 107, column 31: ID "NAVLIST" already defined

    <div id="navcontainer"><ul id="navlist">



    Line 26, column 31: ID "NAVLIST" first defined here

    <div id="navcontainer"><ul id="navlist">

    is there a way to show the menu twice without having to repeat the div id?


    thx in advance

  6. #6
    Join Date
    Jul 2003
    Location
    New York City
    Posts
    2,771
    Why not, as the validator suggested, use a Class instead of an ID?

  7. #7
    Join Date
    Nov 2004
    Location
    Lisboa, Portugal
    Posts
    71
    That's what i'm trying but i doesn't seem to be working

    any ideas on why not?

  8. #8
    Join Date
    Jul 2003
    Location
    Los Angeles California
    Posts
    1,045
    you end things are wrong

    <br /> not <br \>

  9. #9
    Join Date
    Jul 2003
    Location
    New York City
    Posts
    2,771
    Originally posted by cogumelo
    That's what i'm trying but i doesn't seem to be working

    any ideas on why not?
    Have You modified your CSS properly as well? In CSS, the selectors for ids are:

    #idname

    but for classes, you use:

    .classname


    Notice the period before.

  10. #10
    Join Date
    Nov 2004
    Location
    Lisboa, Portugal
    Posts
    71
    i think i'm trying it the right way:

    css:

    #navcontainer
    {
    background:#DDDDDD;
    margin: 0px 0 0 0px;
    padding: 0;
    width: 100%;
    height: 30px;
    border-top: none;
    border-left: none;
    border-bottom: 1px solid #FFFFFF;
    border-right: none;
    }

    #navcontainer ul
    {
    border: 0;
    margin: 0;
    padding: 0;
    list-style-type: none;
    text-align: center;
    }

    #navcontainer ul li
    {
    display: block;
    float: left;
    text-align: center;
    padding: 0;
    margin: 0;
    }

    #navcontainer ul li a
    {
    background: #DDDDDD;
    width: 84px;
    height: 21px;
    border-top: none;
    border-left: none;
    border-bottom: 4px solid #DDDDDD;
    border-right: none;
    padding-top: 9px;
    margin: 0 0 0px 0;
    color: #999999;
    text-decoration: none;
    display: block;
    text-align: center;
    font: normal 11px Verdana, Arial, Helvetica, sans-serif;
    }

    #navcontainer ul li a:hover
    {
    background: #BBBBBB;
    border-bottom: 4px solid #013A94;
    padding-bottom: 0px;
    background: transparent;
    color: #013A94;
    }

    #navcontainer a:active, #navcontainer a:visited
    {
    color: #999999;
    background: #DDDDDD;
    }

    html:

    <div id="navcontainer"><ul id="navlist">
    <li><a href="http://corfebol.no.sapo.pt" title="Início">Início</a></li>
    </ul>

    How do i turn this into classes without screwing up the menu?
    Last edited by cogumelo; 12-16-2004 at 09:22 AM.

  11. #11
    Join Date
    Aug 2004
    Location
    United Kingdom, Northamptonshire
    Posts
    109
    <div class="navcontainer"><ul class="navlist">
    <li><a href="http://corfebol.no.sapo.pt" title="Início">Início</a></li>
    </ul>

    .navcontainer
    {
    background:#DDDDDD;
    margin: 0px 0 0 0px;
    padding: 0;
    width: 100%;
    height: 30px;
    border-top: none;
    border-left: none;
    border-bottom: 1px solid #FFFFFF;
    border-right: none;
    }

    change navlist to a class aswell in your css with a "." instead of "#" as shown above. Think that should do it.

  12. #12
    Join Date
    Nov 2004
    Location
    Lisboa, Portugal
    Posts
    71
    Thx

    I've got it. I was having trouble with the navlist.

    anyway, i can proudly say my website (only the index, so far) is ok by w3c css and html validators. any validators besides the w3c i should be aware of?

    as i said on the 1st post i'm trying to get validated with http://bobby.watchfire.com

    but this one i find particularly hard, should i pay much attention to it?

  13. #13
    Join Date
    Aug 2004
    Location
    United Kingdom, Northamptonshire
    Posts
    109
    The only validator I use for validating CSS and HTML is the w3c one.

    Even though it might of been a stuggle its worth it, glad you got it sorted

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles