• W3C validator complains about

    <header id="branding" role="banner">
    <hgroup>
    <div id="site-logo"><a ... rel="home">
    <img ... />
    </a></div>
    <div id="site-details">
    <h1 id="site-title"><span><a ... rel="home">...</a></span></h1>
    <h2 id="site-description">...</h2>
    </div>
    </hgroup>

    * Error: The hgroup element is obsolete.
    * Error: Element div not allowed as child of element hgroup in this context

    IMHO this HTML fragment is produced by catch-box/header.php

    Please have a look at it.

    Kind regards
    Frank

Viewing 2 replies - 1 through 2 (of 2 total)
  • I meet the same problem… Is there any one can make a suggest?

    Change the hgroup to div like this:

    <header id="branding" role="banner">
    			<div>
    				<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
    				<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
    			</div>

    And add this to your child style.css:

    span {
    border: 0;
    	font-family: inherit;
    	font-size: 100%;
    	font-style: inherit;
    	font-weight: inherit;
    	margin: 0;
    	outline: 0;
    	padding-left: 120px;
    	vertical-align: baseline;
    }
    
    #site-description {
    	color: #7a7a7a;
    	font-size: 14px;
    	margin: 0 270px 3.65625em 60px;
    }

    You can adjust the margin and padding to your taste of course.
    Good luck!

    Johanna

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3C validation fails on hgroup’ is closed to new replies.