Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. // Hello Gabriella
  2.  
  3. // What is the difference with inline styling vs css styling
  4.  
  5. // This was what you used for your images:
  6.  
  7. <div class="lala" style="background: 'your_image'"></div>
  8. // This would add a image to your page, however the height, width isnt set, so when we resize the browser the image will start repeating.
  9.  
  10. // A better way to solve this if you wish to add a background to a section, such as about/contact/faq etc is:
  11. // This is just exampe code
  12. <div class="about">
  13. <div class="container">
  14. <div class="row">
  15. <div class="col-md-4"></div>
  16. </div>
  17. </div>
  18. </div>
  19.  
  20. // Then in your style css
  21.  
  22. .about{
  23. background-image: url('your_image');
  24. background-size: cover;
  25. height: your height here, i suggest looking at what VH and VW is for css, or you can set a fixed height in px or %;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement