Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 11/16/2020 in Posts

  1. Create a custom.css file. place your css code in there, and place link to that! below w3.css link, is the best option. Anything that exists in w3.ccs will be overridden by the same css in custom.css file, CSS = cascading style sheet. If you two identical selectors .selector { color: red;} .selector { color: blue;} The last one will always take precedence over previous. The same will happen if these were placed separately in css files, the selector in the css file link below previous will take precedence.
    1 point
  2. .w3-display-container { overflow: hidden; } .w3-display-container img { max-width: 100%; max-height: 100%; height: 100%; width: 100%; object-fit: cover; } But! your img containers are not! fixed width! or height!
    1 point
  3. I suggest using the object-fit Property https://www.w3schools.com/css/css3_object-fit.asp div{width:390px;height:280px; overflow:hidden; /*background-color: #ccc; */} div img {max-width: 100%;max-height:100%; height:100%;width: 100%; object-fit: cover; } https://www.w3schools.com/code/tryit.asp?filename=GKO6RUZSK2W5
    1 point
  4. is that's what do you mean https://www.w3schools.com/html/tryit.asp?filename=tryhtml_images_background7
    1 point
×
×
  • Create New...