skip to Main Content

Html – Changing from CSS grid layout to flexbox

I was tasked with changing given code that was using CSS grid to one using CSS flexbox layout. This was the given HTML structure: <div class="listing-grid"> <div class="listing"> <img class="listing-image" src="something.jpg" alt="something"> <div class="listing-details"> <h3>Item 1</h3> </div> <div class="listing-price"> <p>Price:…

VIEW QUESTION

Html – div with position: absolute gets the wrong width from the child image, in Firefox only

.div1 { position: relative; padding-bottom: 25%; background: lightcoral; } .img-container { position: absolute; height: 100%; background: green; } .img1 { height: 100%; opacity: 50%; } <div class="div1"> <div class="img-container"> <img src="https://placehold.co/600x300" alt="" class="img1"> </div> </div> Chrome result (expected result): Firefox…

VIEW QUESTION

Html – Align text to left and image to right side of the page

Can somebody please help me how to make the image show up on the right side? I can't figure out why it's not doing anything. @import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"); body { margin: 0; background-color: #000; color: #eee; font-family: Poppins; font-size: 12px; }…

VIEW QUESTION
Back To Top
Search