Skip to main content
Participant
Sep 17, 2020 12:12 PM UTC
Question

Width image auto-completion

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 is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    Jon Fritz
    Community Expert
    Community Expert
    Sep 17, 2020 12:46 PM UTC

    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.

    Translate
    Participant
    Sep 17, 2020 12:49 PM UTC

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

    Translate
    Nancy OShea
    Community Expert
    Community Expert
    Sep 17, 2020 7:19 PM UTC

    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>
    

     

    Translate
    Nancy O'Shea— Product User & Community Expert
    Community Expert
    Sep 17, 2020 12:36 PM UTC

    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.

    Translate
    Participant
    Sep 17, 2020 12:46 PM UTC

    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

    Translate