Preventing Divs from Wrapping in a Floating Layout (Thumbnail)

I have my own website which you can check out by clicking here. I am facing an issue where the text wraps around the image when it is a small image and there is a large amount of text.

<div class="page-list-ext-item">

<div class="page-list-ext-image"><img width="110" height="73" class="attachment-110x110 wp-post-image" src="#"></a></div>


<h3 class="page-list-ext-title">Heading</h3><div class="page-list-ext-item-content">TEXT

<br><br>read more on: <a href="#">Title</a>

</div>

Answer №1

Consider including the following code snippet:

.page-list-ext-item-content{
    overflow:hidden;
}

Implementing this will yield positive results.

Answer №2

To ensure that your markup is valid, it's important to make some adjustments. The current markup you have will not pass validation. Although browsers can attempt to correct invalid markup, it often leads to CSS bugs. In this situation, a float element requires a container with proper clearance, like the following example:

.clear:after {
    content: '.';
    display: block;
    overflow: hidden;
    clear: both;
    height: 0;
    visibility: hidden;
}

Applying this solution will clear the container for your thumbnail, but you must still address issues in your markup.

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

Engaging SVG Experience: Alter the color of one element by hovering over another

I'm currently working on creating an interactive SVG map. I have successfully incorporated code from Illustrator into an HTML file and managed to change the fill color of certain paths when hovering over them. However, I am facing an issue where a whi ...

Div with see-through overlay area

I am attempting to create a visual effect on my webpage where there is a semi-transparent overlay covering all elements except for one specific div. Here is an illustration of the structure of my page: <div id="d1"> <div id="d2"></div& ...

Links remain unclickable in both Chrome and Firefox until the developer tools are activated

I am currently working on a consulting project for a website that is in the process of being redesigned. However, it still needs to function partially during this time. One major issue I have encountered is that on certain pages, the links are not clickabl ...

Adjust time according to specified time zone using JavaScript

I am working on a project involving clocks and timezones. The user should be able to choose a timezone from a combobox, and upon selection, the main digital clock should update to display the time for that timezone. I have a text file called 'zone.txt ...

Using CSS and Semantic UI CDN may encounter issues when testing in a localhost environment

My website's html code is structured as shown below, and the directory path is correct: <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> < ...

Is there a way to adjust the transparency of individual words in text as you scroll down a page, similar to the effect on https://joincly

Is there a way to achieve a text filling effect on page scroll similar to the one found here: . The specific section reads: "Deepen customer relationships. Own the brand experience. Add high margin revenue. Manage it all in one place. Get back your pr ...

What is the best way to use jQuery to animate a particular height up to 100%?

To provide a sneak peek of the content in the div, I have minimized it so only the first line is visible. Now, I want to add an animation that will expand the div to 100% height when you click the title. However, using animate(height:"100%") does not res ...

Struggles with CSS hover effects on text and buttons

Beginner in the world of HTML & CSS Struggling with the following: Hover Effect: Looking to implement a hover effect where hovering over either the staff name text or the circle button above it triggers the appearance of a square border (refer to 'A ...

I am interested in swapping out the text links in a menu for images

Looking to swap out text links in a menu for images, but stuck with template constraints generated by rapidweaver. The HTML template can't be modified, except for the link text itself. For example: <a href="http://truehealth.gr/eng/" rel="">!UK ...

Ensuring that the empty bubble remains undisturbed, here's a guide on effectively implementing the if

I need assistance with adding an "if condition" to my text field. The condition should prevent the empty bubble from appearing when the send button is clicked. function verifyInput(){ var currentText = document.getElementById("demo").innerHTML; var x ...

The size of divs adjust based on the size of the browser window

Within a container div, I have multiple nested divs arranged side by side. The container is 1100px wide and centered in the browser window. In the example image below, three inside divs are illustrated, but there could be more (divD, divE, etc). https://i ...

The div I'm trying to position at the bottom is currently wedged between other divs

My goal is to move the gray rectangle (<div class="brand"> </div>) below the other elements automatically. Currently, it's stuck between the header and two other body divs. Being a beginner, I'm unsure how to fix this. I've tried ...

Decrease the gap between Bootstrap horizontal form elements

Looking to enhance the visual appeal of my form controls, I am using Bootstrap 4 horizontal form to eliminate unnecessary spacing and create a more compact layout. Though I have applied the CSS snippet below to reduce spacing, there is still a noticeable g ...

What steps can I take to ensure my captions are positioned accurately on my content

I have been working on customizing my image gallery to match a specific layout that I want. So far, I have managed to position the caption below the image but to the right instead of centered like in my ideal design. Currently, the caption spans the full w ...

Images that are collapsible and fully responsive are experiencing functionality issues

I am working on a design where clicking on an image will reveal additional information in a collapsible div underneath the image row. The challenge I'm facing is ensuring that this collapsible div spans across the full container regardless of screen s ...

Use flex-grow and flex-wrap to split elements onto separate lines

My parent div, ".tags", contains both links and a title. The parent div is styled with "display: flex;" and "flex-wrap: wrap;". I want the link elements to move onto a new line when they wrap, without being pushed to the right of the screen by the title. ...

placeholder for selecting a file

I'm struggling to replace "no file chosen" with "cv" on the file input field. I tried adding a placeholder, but it didn't work as expected. https://i.sstatic.net/wQqcS.png <div class="col-md-6 form-group "> ...

Leveraging calc() in Material UI

Goal: The aim is to design two divs positioned side by side on a webpage, covering the entire width of the page. This should be achieved using the latest versions of react + Material UI. The div on the left should have a fixed width of 200px. While the ...

What are some ways to implement smooth scrolling when a navigation link is clicked?

I have a total of 3 links in my navigation bar and every time they are clicked, I want the page to smoothly scroll down to their designated section on the webpage. Although I have already set up the anchors, I lack experience in scripting to create the smo ...

What are some ways to display unprocessed image data on a website using JavaScript?

I have an API endpoint that provides image files in raw data format. How can I display this image data on a website using the img tag or CSS background-image property, without utilizing canvas? One possible approach is shown below: $.get({ url: '/ ...