Background design for Foundation email template wrapper

I created an email template using Foundation's Inky framework, which you can check out here:

https://i.sstatic.net/VJJAm.png

The design features a gray background color that looks great in full viewport mode. However, when I resize the window to a certain size, the gray background disappears and appears strange:

https://i.sstatic.net/iY2kx.png

Currently, only the header section retains the gray background while the rest doesn't. My goal is to have the gray background remain consistent regardless of the viewport size. I attempted to use a <wrapper> element as suggested in the Inky documentation, but it didn't solve the issue.

<wrapper bgcolor="#f3f3f3">
    <container>
        <row>
            //content goes here
        </row>
    </container>
</wrapper>

I'm aiming for the design to resemble this template where the gray background stays visible throughout:

https://i.sstatic.net/llUKP.png

Answer №1

Perhaps experimenting with the $main-bg-color SCSS variable in your styles.scss file could produce the desired effect. Be sure to check out the reference guide here.

Answer №2

Everything is functioning correctly as planned. The issue in your scenario arises when the fixed width of the email template matches the screen width, causing the gray background to not be visible.

To address this, consider adding some padding of 5 or 10 to the main wrapper element.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Generating unique triangle patterns through Webgl

Recently, I began learning webgl and have been attempting to create triangles with random sizes and positions similar to the image below using javascript. I understand that I need to utilize a for loop within the function initScene() but I'm uncertai ...

Is it necessary to bring in CSS for the following page?

Should CSS be imported and used across multiple pages in a web application? Is the page structure outlined below considered acceptable, or is there a standard practice to follow? /pages /home index.js index.module.css /cart ...

Error Handling in PHP Form with HTML and Image Upload

Let me give you some context first. Recently, I've delved into the world of php and have been at it for a few days now. My code might be a bit messy, but I've done my best to markup as much as possible. I have a form where three things are expec ...

The unresponsive sticky navigation bar on a Joomla website is causing issues

I recently launched a new website that can be found here. The site includes the following JavaScript code: $(document).ready(function(){ $(window).bind('scroll', function() { var navHeight = $( window ).height() - 70; ...

The Syntax of 2D Transformations

I am currently attempting to apply multiple animations on a single element simultaneously. While I have successfully managed to use the translate property to adjust the element's coordinates, I am encountering difficulties in expanding its height and ...

The combination of min-width and min-height is ineffective on Internet Explorer

My current issue involves CSS for media min-height and min-width, which works perfectly on Chrome but not on IE11. Here's the code snippet in question: @media (min-width: 0) and (max-width: 992px) { @media (min-height: 0) and (max-height: 480px ...

"Typescript throws a mysterious 'Undefined value' error post-assignment

I'm currently working on a task to fetch my customer's branding information based on their Id using Angular. First, I retrieve all the customer data: this.subscription = this.burstService.getBurst().subscribe(async(response) => { if (r ...

Utilizing Bootstrap Icons in Rails 6 Using Webpacker Integration

Looking to incorporate Bootstrap icons from the beta version of "Official open source SVG icon library for Bootstrap" into my project. You can find it at . Currently working with Bootstrap 4 in Rails 6. After attempting different imports and includes in b ...

Make the div in jQuery clickable to redirect to the child URL

Could someone shed some light on why this code isn't functioning as expected? I'm fairly new to javascript and jQuery. Below is the snippet in question: Javascript / jQuery: <script type="text/javascript"> $('.clickk').cl ...

How to make a checkbox list appear bold when checked in AngularJS?

<div class='someClass'> <label ng-repeat="item in itemList"> <input type='checkbox' checklist-model='itemCheckList' checklist-value='item.name'> <span class=& ...

Displaying HTML elements in a specific order using ng-repeat

Upon receiving the json message, my goal is to display it in HTML in a specific order. Within the json message, the position value indicates the desired order of elements, with 0 representing the first element in the array. At times, the json message may ...

How to access the api variable in JavaScript

When attempting to retrieve variables from an API object, I encountered the obstacle of them being nested inside another object named "0" in this particular case. Here is a screenshot from the console: enter image description here Below is the JavaScrip ...

Determining the dimensions of a div once it has completed loading

Is there a way to retrieve the width and height of a div after it has fully loaded, rather than before? I am currently using JavaScript to get the dimensions, but it seems to be returning the values before the image has finished loading. How can I rectify ...

How can I retrieve the value of a selected radio button within a fieldset using jQuery?

I have a fieldset with two radio buttons inside. When a radio button is clicked, I want to retrieve the value of the clicked button. However, my current jQuery code is not functioning correctly and I would appreciate any assistance. HTML: <fieldset id ...

Bootstrap: customizing content for extra-small screens

Currently, I am in the process of developing a website using PHP and MYSQL. While the responsive design with Bootstrap works well for most pages, there are a few pages where not only do the columns need to rearrange for xs screen sizes, but the content wit ...

Seeking help with CSS styling

I ran into an issue while designing a web page using em units. I thought I had a good grasp of it, but when I tried to align two separate span tags with margin-left, they ended up overlapping in the upper-left corner of my header. Even though I used displa ...

I'm experiencing issues with my custom CSS file conflicting with Bootstrap

It's strange, my custom main.css doesn't seem to have any effect on changing the font size or location of the text. However, as soon as I remove the line that links to bootstrap, it starts working perfectly. I believe that the bootstrap.css file ...

Difficulty with displaying Background and Fontface on aspx webpage

My issue lies with a master template in aspx, from which I generate other aspx pages. In this master template, I have referenced a CSS style sheet. Strangely, the background image and font face that I had set up are no longer displaying on any of the aspx ...

Unable to change background image to an external image link

<div class="flipbook-viewport"> <div class="container"> <div class="flipbook"> <div style="background-image:url("https://example.com/images/lareg/1.JPG")">< ...

I customized the navbar in Bootstrap by centering it with custom CSS, but whenever I click on it, it suddenly shifts to one side. I'm puzzled as to why this is happening and

I attempted to center my navbar-toggler element, but was only successful in centering the navbar-contend using Bootstrap. I then took it a step further by trying to center the navbar-toggler icon with custom CSS, however, it now shifts to the left when cli ...