Skip to content

Instantly share code, notes, and snippets.

@nathaningram
Created February 27, 2025 19:49
Show Gist options
  • Save nathaningram/69a7f35c657416231fb17ae8c8cb872a to your computer and use it in GitHub Desktop.
Save nathaningram/69a7f35c657416231fb17ae8c8cb872a to your computer and use it in GitHub Desktop.
Avada Columns
/* Responsive grid for portfolio layout */
.fusion-portfolio-wrapper {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3 columns on large screens */
gap: 20px;
justify-content: center;
align-items: start;
}
/* Responsive adjustments for tablets (768px and up) */
@media (max-width: 1024px) {
.fusion-portfolio-wrapper {
grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
}
}
/* Responsive adjustments for mobile (below 768px) */
@media (max-width: 767px) {
.fusion-portfolio-wrapper {
grid-template-columns: 1fr; /* 1 column on phones */
}
}
/* Ensure each portfolio post takes full column width */
.fusion-portfolio-post {
width: 100% !important;
position: static !important; /* Reset Avada's absolute positioning */
height: auto !important; /* Allow posts to resize dynamically */
}
/* Ensure video wrapper maintains a 16:9 aspect ratio */
.fusion-image-wrapper.fusion-video {
width: 100%;
position: relative;
}
.fluid-width-video-wrapper {
position: relative;
width: 100%;
padding-top: 56.25%; /* 16:9 aspect ratio */
}
.fluid-width-video-wrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* Ensure content wrapper fills available space */
.fusion-portfolio-content-wrapper {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}
/* Adjust title and content alignment */
.fusion-portfolio-content {
text-align: left;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment