ironheartbj18 Posted May 20, 2014 Share Posted May 20, 2014 (edited) Hello at all!, I am working on the img center I am having struggled making the picture at the center . can you please help me with this thank you... <style> { margin:auto; } <!-- fix style later--> </style> <div class = "container"> <img src="images/6.png" alt="Responsive image" class="img-rounded img-responsive" width="auto" > <h2 class="text-center"> Check back soon</h2> </div> i made a video for example https://www.youtube.com/watch?v=4an4mYHbdh0&feature=youtu.be Edited May 20, 2014 by ironheartbj18 Link to comment Share on other sites More sharing options...
dsonesuk Posted May 21, 2014 Share Posted May 21, 2014 img is a inline-element like text, so you could use text-align: center. margin: 0 auto; only works on block elements with fixed width, to use this on img tag make it a block element using display: block; and give it a width. 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