Looking to nest elements using flexbox in order to achieve the following layout:
https://i.sstatic.net/bEKps.png
Does anyone know how to make this happen?
Looking to nest elements using flexbox in order to achieve the following layout:
https://i.sstatic.net/bEKps.png
Does anyone know how to make this happen?
Finally, after several attempts, I believe I have achieved the desired outcome.
body {
background: skyblue;
}
a {
text-decoration: none;
}
.wrapper {
margin: 2%;
}
.articles {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.article-card {
background-color: #FFF;
box-shadow: 0 4px 4px -4px rg;
}
.article-card--big {
width: calc(50% - 30px);
margin-right: 30px;
float: left;
}
.article-card--flex {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
width: 50%;
}
.article-card--landscape {
width: calc(50% - 30px);
float: left;
margin-right: 30px;
margin-bottom: 30px;
}
.article-card--landscape:nth-child(3), .article-card--landscape:nth-child(4) {
margin-bottom: 0;
}
.card-content {
display: block;
padding: 15px;
}
.card-img {
display: block;
background: #ededed;
position: relative;
overflow: hidden;
}
.card-img:before {
display: block;
content: "";
width: 100%;
padding-top: 70%;
}
.card-img img {
position: absolute;
left: 0;
right: 0;
top: -100%;
bottom: -100%;
margin: auto 0;
width: 100%;
height: auto;
}
img {
max-width: 100%;
height: auto;
}
<div class="wrapper">
<section class="articles articles-category">
<article class="article-card article-card--big">
<a href="">
<span class="card-img"> <img src="http://www.placehold.it/300x240" alt=""> </span>
<span class="card-content">
<span class="title">Dolores é Wyatt: teorias finais para o último episódio de Westworld</span>
<span class="infos">
<span class="time">Há 21 horas</span>
</span>
</span>
</a>
</article>
<div class="article-card--flex">
<article class="article-card article-card--landscape">
<a href="">
<span class="card-img"> <img src="http://www.placehold.it/300x240" alt=""> </span>
<span class="card-content">
<span class="title">Dolores é Wyatt: teorias finais para o último episódio de Westworld</span>
<span class="infos">
<span class="time">Há 21 horas</span>
</span>
</span>
</a>
</article>
<article class="article-card article-card--landscape">
<a href="">
<span class="card-img"> <img src="http://www.placehold.it/300x240" alt=""> </span>
<span class="card-content">
<span class="title">Dolores é Wyatt: teorias finais para o último episódio de Westworld</span>
<span class="infos">
<span class="time">Há 21 horas</span>
</span>
</span>
</a>
</article>
<article class="article-card article-card--landscape">
<a href="">
<span class="card-img"> <img src="http://www.placehold.it/300x240" alt=""> </span>
<span class="card-content">
<span class="title">Dolores é Wyatt: teorias finais para o último episódio de Westworld</span>
<span class="infos">
<span class="time">Há 21 horas</span>
</span>
</span>
</a>
</article>
<article class="article-card article-card--landscape">
<a href="">
<span class="card-img"> <img src="http://www.placehold.it/300x240" alt=""> </span>
<span class="card-content">
<span class="title">Dolores é Wyatt: teorias finais para o último episódio de Westworld</span>
<span class="infos">
<span class="time">Há 21 horas</span>
</span>
</span>
</a>
</article>
</div>
</section>
</div>
How can I ensure that a specific animation ends when multiple animations are triggered on an element? My scenario involves an overlay song list that appears when a list icon is clicked. The challenge lies in closing the menu smoothly. I have implemented a ...
Can I customize the styling of a div in accordance with a boolean property called "isActive" on my controller using Angular? <div class="col-md-3" (click)="isActive = !isActive"> <div class="center"> <i class="fa fa-calendar"& ...
I've been exploring different ways to utilize CSS3 Animation Events and Event Listeners across browsers for more precise control over CSS3 animations. While I know it's possible, I'm struggling to implement it due to my current limitations d ...
I'm currently working on a WordPress theme with a fixed header and footer on the homepage, and a vertical slider in between that includes content and images. I've made the website responsive, but I'm facing an issue where the content in the ...
Struggling for weeks now to figure out what's wrong with this code. It works perfectly until I resize the browser, then the menu stays open no matter how many times I click the toggle. I want it to be closed by default and only open when the toggle is ...
Is there a way to trigger an "updating" image to spin while a long JavaScript function is running? I am currently using JQuery to add a class called "spinning", defined in my CSS for the animation. The problem is that when I add the class and then call a l ...
Hey everyone! I'm a newcomer to this community and a newbie when it comes to HTML. :D I encountered a problem recently and discovered that Stackoverflow is full of amazing developers. That's why I've decided to share my problem here and am ...
Recently, I developed a Chrome app that includes an iframe element within it. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="v ...
Currently, I am faced with the task of parsing a dictionary that contains diverse data types and structures in order to extract a list of unique headings. The dictionary not only includes key-value pairs but also nested dictionaries, lists, lists of dictio ...
Currently grappling with a unique CSS challenge related to patterns. Here's what I'm aiming for: For LI 1-3 = green background For LI 4-6 = red background For LI 7-9 = blue background This sequence should repeat as follows: LI 10-12 = green ...
Currently, I am working with the most recent version of Bootstrap and aiming to switch between the recognizable X icon and a hamburger menu. It seems like these two icons are overlapping each other, and I'm unsure if I can modify the default 3 lines o ...
After observing that an element with position:absolute can have its default top value determined based on its immediate parent's position, regardless of whether it is set to relative or not, BoltClock explained that in such cases, it remains in a stat ...
Looking for some creative input here. Don't have a specific question in mind, but open to ideas. Just to clarify, I want both the floating div and the background to resize as the window size changes, while keeping the div in the same position on top ...
Currently, I am working with jQuery's .load(url, ...) function to bring in a url and display it within a div. However, I am facing an issue where the result needs to be resized in order to fit correctly within the layout. Can anyone provide guidance o ...
Hi there, I'm currently facing a small issue and I could really use some assistance. I have a dropdown menu with two selection options - "green" and "blue", and I need to toggle a class based on the selected option. If you'd like to take a look, ...
I am attempting to create a flexible div that will adjust its width and height proportionally based on the viewport size. However, in the example above, this method only seems to make the div expand horizontally without affecting the vertical height (wh ...
Is there a way in Angular ui-select to customize the group label? I want to make it larger than the selection items as shown in the image below. https://i.stack.imgur.com/ofcak.png The list is currently grouped by country, but how can I adjust the size o ...
Title. For my dictionary chrome extension, I am looking to inline a label, input field, and button all in one line. This is what I want to achieve: Define:[ INPUT ] DEFINE The brackets represent the input field and "DEFINE" is the ...
I'm updating a website design using Bootstrap and I want to create a navbar with a video playing in the background. To ensure that the navbar stays fixed at the top while scrolling, I made it sticky. After testing various methods, I managed to posit ...
Here is a fiddle I created to demonstrate the issue at hand... https://jsfiddle.net/scottieslg/q78afsu8/10/ Running this fiddle in Chrome or Opera yields a value of 8. However, Firefox returns 9, and IE gives 8.5. How can I ensure consistency across al ...