What steps should I take to achieve this specific style for my WordPress website post?

Check out the image link here

I'm looking to position the share and read more buttons at the bottom of the div, similar to "Sample Post 14". The trick seems to involve using excerpt or dummy text. Is there a way to achieve this styling with the skeleton framework, given the different column classes like twelve columns or sixteen columns?

Below is my code snippet:

Index.html

   <div class="sixteen columns outer_box">
       <div class="inner_box articles">


           <!--POST TITLE -->
           <h3 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>



           <ul class="data">
             <li><?php the_author_posts_link() ?> /</li>
             <li><?php the_category(', ') ?> /</li>
             <li><?php the_time('F jS, Y') ?> /</li>
             <li><?php comments_number() ?></li>
           </ul>

           <hr>

           <!--FIXED SIZE THUMBNAIL -->

           <div class="align_thumbnail_right">
               <div class="thumbnail"> 

               <?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); echo '<img src="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" width="250px" height="150px" >';  } ?>
               </div>
           </div>


           <div class="content">
              <!--TEXT -->
              <?php the_excerpt(); ?>


             <a href="<?php echo get_permalink(); ?>"><span>Read More</span></a>
           </div>

       </div>
   </div>

   <?php endwhile; ?>

Style.css

.outer_box{border:1px solid #9f9191; margin:0px 0px 20px 0px}
.inner_box{margin:20px}
.articles h3 a{font-family: 'PT Sans', sans-serif; font-size:25px; color:black; text-decoration:none}
ul.data li, ul.data a{display:inline; font: normal normal bold 13px 'PT Sans', sans-serif; color:#565E66; text-decoration:none}
.content a{text-decoration:none; color:black; float:right; display:inline; font-weight:bold}
.content p{line-height:20px; margin-bottom:20px}


 /*POST THUMBNAIL */
.align_thumbnail_right{float:right; margin:0px 0px 20px 20px; background-color:#E8ECEF;}
.thumbnail{margin:5px;}

Answer №1

Hopefully I have addressed your inquiry correctly. After examining your code, it seems that there are some missing styles which I have included in the CSS myself.

style.css

.outer_box {border:1px solid #9f9191;margin:0 0 20px 0px}
.inner_box {margin:10px;overflow:auto;}
.articles h3 a {font-family:'PT Sans', sans-serif;font-size:25px;color:black;text-decoration:none}
h3.post-title {margin:0}
ul.data {margin:0;padding:0}
ul.data li, ul.data a {display:inline;font:normal normal bold 13px 'PT Sans', sans-serif;color:#565E66;text-decoration:none}
.content a {text-decoration:none;color:black;float:right;display:inline;font-weight:bold}
.content p {line-height:1.5;margin:0 270px 20px 0;height:120px;}

 /*POST THUMBNAIL */
.align_thumbnail_right {float:right;margin:5px 0 10px 20px;background-color:#E8ECEF;}
.thumbnail {margin:5px;}

Based on your previous code, it appears that the main issue lies with the inner_box. To address this, ensure that the inner_box utilizes overflow: auto to contain the thumbnail within the box. Additionally, you may specify a specific height for the paragraph to align the share button and link at the bottom.

As a tip, when using a value of 0 in CSS, there is no need to add the px unit after it.

I hope this guidance proves helpful to you.

Answer №2

Check out this approach: Give it a try

Below is the HTML code:

<div class="sixteen columns outer_box">
   <div class="inner_box articles">


       <!--POST TITLE-->
       <h3 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">THE TITLE</a></h3>



       <ul class="data">
         <li>Author post link /</li>
         <li>Category /</li>
         <li>Time /</li>
         <li>32</li>
       </ul>

       <hr>

       <!--THUMBNAIL IMAGE-->

       <div class="align_thumbnail_right">
           <div class="thumbnail"> 

               <img src="" width="250px" height="150px" />
           </div>
       </div>


       <div class="content">
          <!--TEXT-->
          Lorem Ipsum is simply dummy text of the printing and typesetting industry...
       </div>

        <div id="buttonsPanel">
            <div id="sharePanel">
                <div id="facebook" class="shareButton">
                    <!--Facebook Button Code-->
                </div>
                <div id="twitter" class="shareButton">
                    <!--Twitter Button Code-->
                </div>
                <div id="google" class="shareButton">
                    <!--Google Plus Button Code-->
                </div>
                <div id="links">
                <a id="readLink" href="">
                    <span>Read More</span>
                </a>
                </div>
            </div>
            <div style="clear:both;"></div>
        </div>
   </div>

The CSS styling for the buttons:

#sharePanel {
   width: 100%;
}

#buttonsPanel {
   margin-top: 10px;
}

.shareButton {
    width: 50px;
    height: 20px;
    float: left;
    margin-right: 5px;
}

#facebook {
    background: blue;
}

#twitter {
    background: #58FAF4;
}

#google {
    background: red;
}

#links {
    width: 120px;
    text-align: right;
    float: right;
}

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

Preserve current color during CSS keyframe animation transitions

I am currently working on developing a dynamic 'hinting' system. I am trying to figure out a way to make an element blink using only CSS, but I'm not sure if it's even possible. In the past, I believed that you needed to define the begi ...

"Enhance your code editing experience in Eclipse with HTML, CSS, and JavaScript syntax

Hi there! I'm looking for a way to enable syntax highlighting for HTML/CSS/JS in Eclipse. My main focus is on developing in Python using the PyDev package, but currently I am working on creating Cheetah templates which are difficult to read without pr ...

Extract information from various webpages with identical URLs

I am struggling to extract data from a specific webpage (). Even though I can successfully gather information from the initial page, whenever I attempt to navigate to subsequent pages, it continues to display the same dataset. It seems to retrieve the iden ...

Displaying divs of varying heights in a line

I'm facing a challenge in creating floating divs, just like illustrated in the image provided in the link below. Currently, I am employing the float left property to align all the divs next to each other. The first picture displays the default layout ...

What are the best methods for ensuring a website maintains consistent visibility across all different screen sizes?

Recently, I created a website tailored for a viewport size of 1366px by 768px. My goal is to maintain the same design regardless of the browser window size without implementing responsive design techniques. For instance: When viewing the website on a 360 ...

Maximizing the Potential of Bootstrap 5's Grid System

I'm struggling a bit with the Bootstrap grid system. I want to create 6 divs or containers that span the full width on smaller devices like mobiles, use 25% of the width on medium devices like tablets, and display all 6 in a single row on large deskto ...

Altering data in a concealed dynamic HTML form

I have a hidden form on my webpage that gets populated dynamically when a button is clicked. I want to be able to change the values within this form dynamically. Initially, the form looks like this: <form id="zakeke-addtocart" method="pos ...

How about this: "Using jQuery, we detached the element with the class 'myClass', then cloned it. But wait, where did my nested table go?"

I'm facing an issue where I have a div containing a table that I want to reuse for multiple entries in a JSON database. <div class="myButton"> <table> <tr id="currentVersion"> ...

Tips for implementing a jQuery plugin on specific elements within an HTML page

I've been experimenting with the jQuery extension for searchable dropdowns available at this link. While I am impressed with its functionality, I'm looking to apply it selectively to specific elements on my webpage rather than all of them. Is the ...

AngularJS: A Step-By-Step Guide to Adding Two Values

Currently, I am utilizing the MEAN stack for my application with AngularJS as the front-end. I have two tables in which I obtained total sum values like 124.10 in the "conversion rate" column. Now, I am looking to calculate the total sum of the "conversion ...

Is there a way to specify both a fixed width and a custom resizable length for a Spring <form:textarea /> element?

Despite extensive research, I have yet to find an answer to my specific problem. Within a model window, I have a textarea element: <div class="form-group"> <label for="groupDescription" class="col-sm-2 control-label"> Descripti ...

Tips for applying unique CSS classes to individual templates in Joomla

I manage a website at www.kadamjay.kg using an RT template system where each language version has its own unique template. However, when I add a class to a specific element, it only changes on one template and there are no additional templates in the pat ...

Show or hide a fixed position div using jQuery when clicked

I am new to jQuery and I am trying to create a "full page menu" on my own. However, I am struggling to hide the menu on the second click. I tried using .toggle() but I found out that it has been deprecated. Can someone assist me with this? Thank you so muc ...

What is the method for including the "edit post" feature on a WordPress page where I am displaying a particular page ID using echoing?

Currently, I am in the process of customizing a theme from Elegant Themes called Aggregate. I have managed to customize the home page to feature editable content by pulling in information from a separate page ID and echoing it out. My main query is whether ...

Issues with maintaining the checked state of radio buttons in an Angular 4 application with Bootstrap 4

In my Angular 4 reactive form, I am struggling with the following code: <div class="btn-group" data-toggle="buttons"> <label class="btn btn-primary" *ngFor="let item of list;let i=index" > <input type="radio" name="som ...

What is the best way to utilize justify-content or align-self to perfectly center this?

Despite my efforts to center it, I'm struggling to do so. I've experimented with justify-content and align-items for each row and col class, but unfortunately, nothing seems to be effective. In the breakpoints (md, lg), I really need the 4 lorem ...

housing the picture within a CSS grid

I am new to working with css grids and I have encountered an issue. The background image I want to use is larger than the size of the grid itself. How can I make the image fit within the grid without exceeding its boundaries? When I attempt to insert the ...

Tips for enabling the background div to scroll while the modal is being displayed

When the shadow view modal pops up, I still want my background div to remain scrollable. Is there a way to achieve this? .main-wrapper { display: flex; flex-direction: column; flex-wrap: nowrap; width: 100%; height: 100%; overflow-x: hidden; ...

Utilize image maps for dynamically displaying and concealing div elements

Here is the current state of my code... VIEW DEMO I am aiming to display the blue text to the user only when they click on the blue circle, etc... I believe I need to modify the attributes of the div elements, but I am not very familiar with jQuery and ...

The header grid will disappear in the p-dialog when the browser is minimized

Check out this informative article on creating a dynamic dialog box using PrimeNG here Take a look at the image below to see how the dialog box appears when opened: One issue I am facing is that the grid header gets hidden when I minimize the browser ...