• Resolved abuomama

    (@abuomama)


    Hi,

    Can you please check and let me know how we can remove these errors.
    ————————————
    Error: Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)

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

    e.io/ –>?<style type=”text/css”>?.swit

    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.
    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.
    ———————
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    The error says “Element style not allowed as child of element div in this context”, it seems that you have placed the language selector somewhere it does not like.

    You should be able to manually remove style from Widget Code section in GTranslate settings page and move it into your theme CSS to make the validator happy.

    To provide more specific details I’ll need your website address to check it for you and see the exact context.

    Thanks! ??

    Thread Starter abuomama

    (@abuomama)

    Hi @edo888 ,

    you can check here – https://validator.w3.org/nu/?doc=https%3A%2F%2Fmedicaldarpan.com%2F

    please give any solution.
    Thanks

    Plugin Author edo888

    (@edo888)

    Hi,

    As mentioned earlier you can copy the CSS rules inside Widget Code section into your theme and remove the <style> element completely from Widget Code in GTranslate settings page.

    I also see that it complains about img tags not having src attribute, this is done intentionally to enable lazy loading of the flags. If you want to get rid of the error you can change data-gt-lazy-src to src in Widget Code section, but it will disable the lazy loading.

    Thanks! ??

    Thread Starter abuomama

    (@abuomama)

    Hi,

    you mean say remove code from plugin file?

    Thanks!

    Plugin Author edo888

    (@edo888)

    Hi,

    No, please go to GTranslate settings page and you will see Widget Code section there (bottom of the page). You will need to move CSS rules from style element into your theme.

    Thanks! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘HTML validation error’ is closed to new replies.