• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Need help with an error in dreamweaver

New Here ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

I am putting together a website from a template and I keep running into the following error.


the value of attribute [ data-vide-bg ] must be in double quotes.

 

Here is the line of code in question

<section class="video-section overlay" data-vide-bg= '{"mp4": "video/video-calltoaction.mp4", "poster": "video/placeholder.jpg"}' data-vide-options="posterType: jpg, loop: true, muted: true">

 

I have tried adding double quotes around data-vide-bg but I just get a different error all together. Can someone help me figure out what I'm missing?

 

Views

123

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
community guidelines
Community Expert ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

Sounds like the Linter telling you something that isn't true... again.

DW's Linting program (the error checker) is less than stellar and often gives "errors" where there are none. Use the real validator at http://validator.w3.org/nu if it says you're good, you can ignore DW's chirping.

If you would like not to be told your clean and valid code is wrong, got to Edit > Preferences > Linting and uncheck the box for Enable Linting.

If you don't mind being told your code is wrong, when it is, and you just want the double quote "error" to go away, you can go to Edit > Preferences > Linting > highlight HTML > click Edit & Apply > scroll to "attr-value-double-quotes": true, and change it to "attr-value-double-quotes": false, > Save and close.

Votes

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
community guidelines
New Here ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

That's great to hear, thank you! I can quit banging my head against the wall trying to figure out what I am missing.

Votes

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
community guidelines
Community Expert ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

LATEST

Try reversing the double & single quotes.   Expressed this way, no errors are reported.

<section class="video-section overlay" data-vide-bg= "{'mp4': 'video/video-calltoaction.mp4', 'poster': 'video/placeholder.jpg'}" data-vide-options="posterType: jpg, loop: true, muted: true">

</section>

 

You'll need to test it in production.  Failing that, revert to what @Jon Fritz said.

 

Hope that helps.

 

Nancy O'Sheaā€” Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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
community guidelines