Skip to main content
Participant
September 17, 2020
Question

Width image auto-completion

  • September 17, 2020
  • 2 replies
  • 332 views

Hi All

With my last laptop when I used to write width in an image, it was auto-completed by Dream when you write the first ".
But on the new laptop it doesn't work anymoye.
Where is this option please ?
Thank you in advance.
Fabien

    This topic has been closed for replies.

    2 replies

    Jon Fritz
    Community Expert
    Community Expert
    September 17, 2020

    If the settings Ben points to are correct, this can also happen because of html errors in your code.

    Run your page through the validator at http://validator.w3.org/nu and clean up any errors it finds. That may bring the code completion back online for you.

    Participant
    September 17, 2020

    Thank you but even if I desactive w3c, witdh isn't purposed when I write ' witdh=" '.

    Nancy OShea
    Community Expert
    Community Expert
    September 17, 2020

    Width is in my CSS code. I prefer to have no width in my HTML markup.

     

    For example, this same sized image displays differently depending on which CSS code I use.

    Try it yourself.

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>Image Test</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <style>
    .container {
    width: 98%;
    margin: 0 auto;
    border: 2px dotted red;
    }
    img { max-width: 100%; }
    
    .full-screen { width: 100% }
    </style>
    </head>
    
    <body>
    <div class="container">
    <div> <img src="https://dummyimage.com/1200x350" alt="placeholder"> </div>
    
    <div> <img class="full-screen" src="https://dummyimage.com/1200x350" alt="placeholder"> </div>
    </div>
    </body>
    </html>
    

     

    Nancy O'Shea— Product User & Community Expert
    Community Expert
    September 17, 2020

    If you go to the Dreamweaver settings, click on Code Hints and there you will see options for auto-completion for quotes that should fix your issue.

    Participant
    September 17, 2020

    Thanks Ben_M for your answer !
    But this option was deactivated.

    I mean when I have this : src="images/logo.png" width="

    Dream gives automatically the width of the image

    And so I have this : src="images/logo.png" width="160"

    Thanks a lot