Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Not sure how to fix errors

Engaged ,
Apr 09, 2018 Apr 09, 2018

Copy link to clipboard

Copied

I am using a Bootstrap 3 panel accordion and have quite a few errors, but I'm not sure what I need to do to correct them. I think because of the errors, the open/collapse has stopped working. This is the first but repeating error message I'm getting when running the validator:

Line 72   Bad value 100% for attribute height on element img : Expected a digit but saw % instead. [html5]

Here is the link: http://www.renegadescookingteam.com/sponsors.html

Any helpful insight would be greatly appreciated.

John

Views

468
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 09, 2018 Apr 09, 2018

html 5 doesnt allow % on width or height so you need to convert it to inline css:

<img src="images/2014_SponsBrd_names_print.jpg" style="width: 100%; height: 100%;" alt=""/>

or better, get rid of all the width and heights from your accordion images:

<img src="images/2014_SponsBrd_names_print.jpg" alt=""/>

and use css to target all of the images in the accordion <div>:

#accordion img {

width: 100%;

height: 100%;

}

Accordion opens and collapses for me, nothing to do with the errors about the images

Votes

Translate
LEGEND ,
Apr 09, 2018 Apr 09, 2018

Copy link to clipboard

Copied

html 5 doesnt allow % on width or height so you need to convert it to inline css:

<img src="images/2014_SponsBrd_names_print.jpg" style="width: 100%; height: 100%;" alt=""/>

or better, get rid of all the width and heights from your accordion images:

<img src="images/2014_SponsBrd_names_print.jpg" alt=""/>

and use css to target all of the images in the accordion <div>:

#accordion img {

width: 100%;

height: 100%;

}

Accordion opens and collapses for me, nothing to do with the errors about the images

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 09, 2018 Apr 09, 2018

Copy link to clipboard

Copied

LATEST

Thank you for the explanation. And thank you to all who replied.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 09, 2018 Apr 09, 2018

Copy link to clipboard

Copied

jodmcc49  wrote

I am using a Bootstrap 3 panel accordion and have quite a few errors, but I'm not sure what I need to do to correct them. I think because of the errors, the open/collapse has stopped working.

You have to click the text link to open panels.   It works for me in Firefox.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines