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
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
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
Copy link to clipboard
Copied
Thank you for the explanation. And thank you to all who replied.
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.