Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Element style not allowed as child of element div in this context

Discussion in 'Misc WordPress Requests' started by nicopointcom, Nov 23, 2017.

  1. nicopointcom

    Guest

    Element style not allowed as child of element div in this context, by nicopointcom

    hello community !

    I try to have a clean markup html with W3C and fews issues are difficult for me to fix.
    I have three times this issue :

    Error: Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)

    From line 174, column 1; to line 174, column 23

    x" /></p>↩<style type='text/css'>↩ #g

    Contexts in which element style may be used:
    Where metadata content is expected.
    In a noscript element that is a child of a head element.
    In the body, where flow content is expected.
    Content model for element div:
    If the element is a child of a dl element: one or more dt elements followed by one or more dd elements, optionally intermixed with script-supporting elements.
    If the element is not a child of a dl element: Flow content.

    html in validator is :

    <style type='text/css'>↩
    #gallery-2 {↩
    margin: auto;↩
    }↩
    #gallery-2 .gallery-item {↩
    float: left;↩
    margin-top: 10px;↩
    text-align: center;↩
    width: 33%;↩
    }↩
    #gallery-2 img {↩
    border: 2px solid
    #cfcfcf;↩
    }↩
    #gallery-2 .gallery-caption {↩
    margin-left: 0;↩
    }↩
    /* see gallery_shortcode() in
    wp-includes/media.php */↩
    </style>↩
    <div id='gallery-2' class='gallery galleryid-566 gallery-columns-3 gallery-size-thumbnail'>↩
    <dl class='gallery-item'>↩

    I see that is an issue with the galery shortcode wordpress core, but what should i do know?

    my html on wordpress for thoses pages are just like :

    <p>[gallery link="file" ids="129,126,123,75,72,69,66,63,60,57,54,51"]</p>

    if someone has an idea, got one day the same issue.

    thanks !

    Element style not allowed as child of element div in this context
     
    #1

Share This Page

Web Hosting