Title: Max-Width not correct working
Last modified: October 7, 2019

---

# Max-Width not correct working

 *  Resolved [wpgeekde](https://wordpress.org/support/users/wpgeekde/)
 * (@wpgeekde)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/max-width-not-correct-working/)
 * Die max-with kann ich einstellen, steht default auf 500px. Das ist auch gut so.
 * Wenn ich nun an einem mobilen Gerät mit beispielsweise 380px die Seite anschaue
   wird das Bild nicht runter skalliert und ist breiter als der Bildschirm (das 
   Fenster, der Viewport). Ganz so als wäre hier nicht max-width sondern width gesetzt.
 * Wie kann ich es erreichen das die Breite max 500px UND max 100% der Bildschirm-,
   Fenster-, bzw. Viewport-Breite ist?
    -  This topic was modified 6 years, 6 months ago by [wpgeekde](https://wordpress.org/support/users/wpgeekde/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Brecht](https://wordpress.org/support/users/brechtvds/)
 * (@brechtvds)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/max-width-not-correct-working/#post-12005326)
 * Can you give me a link to a page with this problem?
 * If you want things to be responsive you’d use something like this in your CSS:
 *     ```
       width: 100%;
       max-width: 500px;
       ```
   
 *  Thread Starter [wpgeekde](https://wordpress.org/support/users/wpgeekde/)
 * (@wpgeekde)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/max-width-not-correct-working/#post-12005722)
 * Thanks Brecht. The solution was a mix out of 2 things:
 * 1) I thought I need to set 100% as the max-width and not the width like you mentioned
   correct
    2) I needed to set the width:100px for “.vlp-link-container”. The issue
   was, that “.vlp-link-container” wasn’t defined in my css, that’s why all my attemps
   before failed.
 * Is the “.vlp-link-container” in your default css? If not it makes maybe sense
   to add it with the width:100% !?
    -  This reply was modified 6 years, 6 months ago by [wpgeekde](https://wordpress.org/support/users/wpgeekde/).
    -  This reply was modified 6 years, 6 months ago by [wpgeekde](https://wordpress.org/support/users/wpgeekde/).
    -  This reply was modified 6 years, 6 months ago by [wpgeekde](https://wordpress.org/support/users/wpgeekde/).
 *  Plugin Author [Brecht](https://wordpress.org/support/users/brechtvds/)
 * (@brechtvds)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/max-width-not-correct-working/#post-12005789)
 * It’s a div block element which defaults to width 100%. It’s possible your theme
   is overriding that.
 * But happy to hear you got things working!
 *  Thread Starter [wpgeekde](https://wordpress.org/support/users/wpgeekde/)
 * (@wpgeekde)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/max-width-not-correct-working/#post-12005860)
 * I wasn’t 100% correct…. don’t know why, but suddenly it wasn’t working.
 * Here are now the working css parts, the bold ones I added:
 * .vlp-link-image img{max-width:500px;**width:100%**;margin-right:10px;margin-bottom:
   10px}.
    **.vlp-link-container{width:auto}**
 * with:100% for link-container isn’t working, auto is needed here. This is working
   in Firefox and Chrome (others I haven’t tested).
 * Hope this helpes others with the same issue.
    -  This reply was modified 6 years, 6 months ago by [wpgeekde](https://wordpress.org/support/users/wpgeekde/).
    -  This reply was modified 6 years, 6 months ago by [wpgeekde](https://wordpress.org/support/users/wpgeekde/).
    -  This reply was modified 6 years, 6 months ago by [wpgeekde](https://wordpress.org/support/users/wpgeekde/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Max-Width not correct working’ is closed to new replies.

 * ![](https://ps.w.org/visual-link-preview/assets/icon-256x256.png?rev=2010740)
 * [Visual Link Preview](https://wordpress.org/plugins/visual-link-preview/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/visual-link-preview/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/visual-link-preview/)
 * [Active Topics](https://wordpress.org/support/plugin/visual-link-preview/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/visual-link-preview/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/visual-link-preview/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [wpgeekde](https://wordpress.org/support/users/wpgeekde/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/max-width-not-correct-working/#post-12005860)
 * Status: resolved