Table Spacing Problem

Check out my website here:

I am trying to introduce some spacing between each column element where the coupon ends and the following business name is displayed. It seems like adding a line break is causing issues with the layout. Here is the code snippet I am currently working on:

<?php
/**
 * The template for displaying all pages marked home.
 *
 * This is the default template that displays all pages in WordPress.
 * Keep in mind that other 'pages' on your WordPress site will use a different template.
 *
 * @package Smart Brands

 */

get_header(); ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <div class="hero-wrapper"> <!-- Start .hero-wrapper -->

        <div class="hero container_12">

            <img src="<?php echo $cfs->get('hero_image'); ?>" alt="img-hero-01" border="0" class="hero-image" />

            <div id="call-to-action" class="grid_6">

                <?php echo $cfs->get('hero_content'); ?>                

            </div>

        </div>

    </div>
    <!-- End .hero-wrapper -->

    <div class="feature-wrapper"> <!-- Start .feature-wrapper -->

        <div id="features" class="container_12"> <!-- Start features -->

<?php
$fields = $cfs->get('features');
$i = 0;
foreach ($fields as $field) {
    $i++;
    echo '<div class="grid_8"> <!-- Start .feature --><div class="feature">';
  echo '<a href="'.$field['feature_link'].'"><img src="' . $field['icon'] . '" alt="smartbrand icon" width="139" height="160" class="floatLeft feature-icon"></a>';
  echo '<h4><a href="'.$field['feature_link'].'">'.$field['title'].'</a></h4>';
  echo '<div class="mobile-text"><p class="justify">'.$field['text'].'</p></div>';
  echo '<a href="#" data-reveal-id="coupon-modal-'.$i.'" class="coupon"><span><img src="'.$field['coupon_promo_text_img'].'" alt="" border="0" /></span><img src="'.$field['coupon_image'].'" class="responsive" alt="" />
<h1>'.$field['coupon_title'].'</h1></a>';
  echo '</div><!- - End .feature  - -></div>';
  echo '<div id="coupon-modal-'.$i.'" class="reveal-modal">';
  echo '<div align="center"><div class="coupon-border"><img src="'.$field['coupon_pdf_image'].'" class="responsive" /></div><a class="download-btn" href="'.get_template_directory_uri().'/download.php?

file='.$field['coupon_pdf'].'">Click to download</a></div>';
  echo '<a class="close-reveal-modal">&#215;</a></div>';

}
endwhile; // end of the loop.

 ?>
        </div>
        <!- - End container_12  - ->

    </div>
    <!- - End .feature-wrapper  - ->




<?php get_footer(); ?>

Here is the CSS Stylesheet:

<?php
/**
 * The template for displaying all pages.
 *
 * This is the default template that displays all pages in WordPress.
 * Other 'pages' on your WordPress site will have a different template.
 *
 * @package Smart Brands
 */

get_header(); ?>

    <div id="primary" class="content-area">
        <div id="content" class="site-content" role="main">

            <?php while ( have_posts() ) : the_post(); ?>

                <?php get_template_part( 'content', 'page' ); ?>

                <?php
                    // If comments are open or we have at least one comment, load up the comment template
                    if ( comments_open() || '0' != get_comments_number() )
                        comments_template();
                ?>

            <?php endwhile; // end of the loop. ?>

        </div><!-- #content -->
    </div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Answer №1

When working on your website's styling, head to line 303 in your CSS file. Make sure to include the property margin-bottom within your feature class, as illustrated below:

.feature {
    margin-bottom: 20px; /*add this new line according to your preference*/
    overflow: hidden;
    text-align: right;
}

Answer №2

Just a heads up, the second set of codes is not related to the CSS file. Make sure to locate the correct CSS file and incorporate the padding-top attribute to the .grids class based on how much separation you want between them.

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

Fluid imitation pillars with a decorative outer edge

Looking to create a modern, sleek 2-column HTML5 interface with a left sidebar and main content area on the right. Backwards compatibility is not an issue as all users will be using the latest versions of Chrome or FF. The goal is to give the sidebar a ba ...

Achieving the perfect horizontal alignment of images

Currently working on a new project and here's the page I'm focusing on: The elements are exceeding the set height of their container and overlapping into the content area instead of pushing the existing content down. Any suggestions to fix this ...

Access a folder in JavaScript using Flask

I need to specify a directory in a script. $images_dir = '{{url_for('.../pictures')}}'; In my flask application directory structure, it looks like this: Root -wep.py -templates -gallery.html -static -pictures The images are stored ...

The Facebook like button disappears after being used just once

I've encountered an odd issue that hopefully someone can help me understand. WEBSITE: ISSUE: Initially, the like button functions properly. However, upon refreshing the page or navigating away and returning to the homepage, the like button mysterio ...

Exploring JSON without taking into account letter case

Looking to conduct a case-insensitive search in a JSON file? Here's the JSON data you can work with: { "Data" : [ {"Name": "Widget", "Price": "25.00", "Quantity": "5" }, {"Name": "Thing", "Price": "15.00", "Quantity": "5" }, {"Nam ...

Error: Java Applet cannot be found

As I've come to understand, Java applets are no longer widely used and supported by most browsers. Could it be that my issue is simply due to lack of support? I'm currently testing my HTML file using Internet Explorer on Windows 10 with the follo ...

The output in the window will display the result of doubling the input box value, not the div

Can someone help me figure out why my code isn't working as expected? I'm trying to create a text box where you can enter a number, click a button, and it will multiply the number by two and display the result. However, right now, the code opens ...

Create a shape using a series of points without allowing any overlap between the lines

JS fiddle There is an array of coordinates that gets populated by mouse clicks on a canvas. var pointsArray = []; Each mouse click pushes x and y values into this array using a click event. pointsArray.push({x: xVal, y: yVal}); The script iterates thr ...

What is the process for customizing styles within the administrative area of a Wordpress website, such as modifying the shade of the admin toolbar?

Can someone provide guidance on changing the color of a specific dashicon in the WordPress admin toolbar? I've tried adjusting the color using the browser inspector, but I can't seem to get it to work when I add the code to my stylesheet. #admin ...

What is the best way to include a background image in an Angular selector?

I'm having trouble setting a background image for an Angular selector. Here's the code I'm using: <app-highway-card [ngStyle]="{'background-image':'url(https://cdn.pixabay.com/photo/2021/09/04/09/32/road-6597404__340.j ...

Ways to position a button to the right in one div and a button to the left in another div

Imagine you have two buttons that are supposed to be near each other. Take a look at the following code: <div class="form-inline move_down"> <div class="col-md-3 col-6"> <button class="btn btn-primary btn-sm move_right_component" t ...

Looking to understand how to effectively utilize the ContentProtectionCallback in SHAKA PLAYER?

Could someone assist me in understanding how to pass the ContentProtectionCallback in order to manage the preProcessor of a drm license url for shaka player? [ var manifestUri = '<mpd url>'; function initApp() { // Including nece ...

The BBCode seems to be malfunctioning

I created a custom BBCode for my PHP website to display tabbed content on a page. After testing the BBCode on a separate webpage and confirming there are no errors, I am facing an issue where the tabbed content is not showing up on the actual posting page. ...

JavaScript Object has Not Been Defined

Currently, I am developing a small program for myself related to a video game. The main issue I am facing is that certain objects are being flagged as not defined when the errors appear on the page. $(document).ready(function(){ //A list of chara ...

Hidden menu does not work with Jquery

As I work on creating a responsive website, I am faced with the challenge of implementing a menu that only opens on mobile devices when clicked. I came across some code on Stackoverflow that I thought would solve this issue for me. However, I seem to be en ...

Trouble with integrating HTML5 canvas from an external JavaScript file

Having trouble with storing canvas js in an external file. If the javascript responsible for drawing on the canvas is included in the html header, then the rectangle is displayed correctly. Here is the working html (javascript in html header): <!DOCT ...

CSS sidebars are failing to display on the website

Working on a supposedly simple template turned out to be more challenging than expected. The template lacked sidebars, so I attempted to add them myself. However, my test text isn't displaying as intended. Could someone please help me identify the mi ...

What are some ways to enhance the speed of swipe and scrolling on mobile devices using Javascript, CSS, and HTML?

Dealing with slow scrolling on iPhones has been a challenge for me. The application was developed using Vue.js. I was able to increase the scrolling speed on desktop using Javascript, but unfortunately, it doesn't translate well to mobile devices due ...

Customize CKEditor by automatically changing the font family when the page is loaded

How can I change the font-family of CKEditor to Meiryo based on a JavaScript boolean? I attempted this code in my custom JS within an if condition, but it did not successfully change the font-family: config.font_style = { element : 'span&apo ...

drop down menu in navigation bar: unable to display items

I am having trouble with a dropdown menu in my code. Even though I used the code from the official Bootstrap website, the items are not appearing in the dropdown list. <nav class="navbar navbar-expand-lg navbar-dark bg-primary "> ...