CommanderK Posted January 31, 2018 Share Posted January 31, 2018 I'm building some kind of gallery. But I got some problems with the width of an image inside a div. <div class="split right"> <div class="row thumbs"> <div class="row thumb col-lg-4 col-md-4 col-sm-6 col-xs-12"><img src="image.png" class="thethumb"></div> </div> </div> In CSS I got this: .row.thumbs { position: relative; } .row.thumb { margin-left: auto; margin-right: auto; width: 100%; position: relative; overflow: hidden; height: 200px; } .thehumb { width: 100%; } In this mediascreen I want the div to be 100% in width of the page. And the image 100% of the parent div. For all other mediascreens it works fine (with different widths). Somehow I can't control the width of the image in the mediascreen, it keeps posting the image in full width of the original image I uploaded in Wordpress. What am I doing wrong? Link to comment Share on other sites More sharing options...
CommanderK Posted January 31, 2018 Author Share Posted January 31, 2018 With a work-around. I added 'img-responsive' as a class in .thethumb and override the max-width to none. Now it works fine Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now