Highlighted

Not sure how to fix errors

Community Beginner ,
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

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

Views

143

Likes

Translate

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

Not sure how to fix errors

Community Beginner ,
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

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

Views

144

Likes

Translate

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
Apr 09, 2018 0
LEGEND ,
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

Likes

Translate

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
Reply
Loading...
Apr 09, 2018 0
jodmcc49 LATEST
Community Beginner ,
Apr 09, 2018

Copy link to clipboard

Copied

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

Likes

Translate

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
Reply
Loading...
Apr 09, 2018 0
Adobe Community Professional ,
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, ACP
Alt-Web Design & Publishing

Likes

Translate

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
Reply
Loading...
Apr 09, 2018 0