WordPress.org

Ready to get started?Download WordPress

Forums

Catch Box
W3C validation fails on hgroup (3 posts)

  1. Frank Schwarz
    Member
    Posted 1 year ago #

    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

  2. huixia0010
    Member
    Posted 1 year ago #

    I meet the same problem... Is there any one can make a suggest?

  3. johanna2patricia
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.