danielfelix Posted January 13, 2017 Share Posted January 13, 2017 My problem is very basic. I can not center in the page a card that includes a picture. Can you help me? Thank you! Link to comment Share on other sites More sharing options...
dsonesuk Posted January 13, 2017 Share Posted January 13, 2017 You can use text-align: center; or margin: 0 auto; Link to comment Share on other sites More sharing options...
danielfelix Posted January 13, 2017 Author Share Posted January 13, 2017 Sorry, but in this case, how should I write it? <!DOCTYPE html> <html> <title>W3.CSS</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css"> <body> <div class="w3-container"> <h2>Photo Card</h2> <div class="w3-card-12" style="width:50%"> <img src="img_fjords.jpg" alt="Norway" style="width:100%"> <div class="w3-container w3-center"> <p>The Troll's tongue in Hardanger, Norway</p> </div> </div> </div> </body> </html> Link to comment Share on other sites More sharing options...
dsonesuk Posted January 13, 2017 Share Posted January 13, 2017 <div class="w3-card-12" style="width:50%; margin: 0 auto;"> Link to comment Share on other sites More sharing options...
danielfelix Posted January 13, 2017 Author Share Posted January 13, 2017 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