I'm sorry, but I have no idea how to google this question. I'm sure it's simple. I have a horizontal card with an image on the right. When the page get small enough, the image drops down below the text. I didn't design it this way, but I don't mind it.
When horizontal, I want the image to be a certain size no matter the image resolution along with rounded corners on the right.
When vertical, I want the image to fill the entire width of the card and have rounded corners on the bottom.
Question: What is the CSS element that identifies the transition from image on right to image down below?
EXTRA RAMBLING BY ME
Obviously one solution is to have separate CSS directives: one for when the image is on the right with a set height/width and rounded corners on the right, and another for when the image is on the bottom with height/width set to auto/100%.
Another solution is to keep the image on the right and have it shrink in width but allow the image height to grow depending on the amount of text.
So in my style.css, I would have something like:
.image-round-right {
width:350px;
max-height:auto;
border-radius:0px 5px 5px 0px;
}
.image-round-bottom {
width:auto;
height:auto;
border-radius:5px 5px 0px 0px;
}
- Not sure if auto or 100% is better in this case.
I would try using media query points like in this question, but I was unable to get anything to take effect.
(original html, posted after amruth gave his answer)
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet" />
<body>
<div class="container-fluid">
<div class="card flex-md-row mb-4 box-shadow h-md-250 m-3">
<div class="card-body d-flex flex-column align-items-start flex-grow-1 pr-md-3">
<h3>Card Title</h3>
<p class="card-text mb-auto">
Extra Text. Extra Text. Extra Text. Extra Text. Extra Text. Extra Text. Extra Text.Extra Text.Extra Text.
Extra Text. Extra Text. Extra Text. Extra Text. Extra Text. Extra Text. Extra Text.Extra Text.Extra Text.
Extra Text. Extra Text. Extra Text. Extra Text. Extra Text. Extra Text. Extra Text.Extra Text.Extra Text.
</p>
</div>
<div class="img-round-right">
<a href="https://www.yahoo.com" title="" target="_blank">
<img src=http://www.independentmediators.co.uk/wp-content/uploads/2016/02/placeholder-image.jpg
class="img-fluid" style="width:auto;height:250px;border-radius:0px 5px 5px 0;">
</a>
</div>
</div>
</div>
</body>