Arranging media elements in Bootstrap to interchange text with an image

Utilizing the Twitter Bootstrap example, I attempted to have the text of the media object wrap around an image. However, it seems that this feature is not functioning correctly, as illustrated in the image provided below.

You can visit the site at

Is there a way to ensure that the text wraps around the image when the screen width decreases?

Answer №1

The use of overflow: hidden in the .media-body class keeps the text from wrapping around the image.

An alternative solution to this issue is to modify the CSS like so :

.media-body {
    overflow: visible;
}

Answer №2

Make sure to place your image within the media-body element and then apply the style float:left;

.media-body a {
  float: left;
  margin-right: 15px;
  margin-bottom: 2px
}
<div class="media">
                       
                       <div class="media-body">
                           <a href="https://www.youtube.com/watch?v=-5iYmtBItC8" style="
    float: left;
">
                               <img class="media-object" alt="64x64" style="width: 164px; height: 100px;" src="https://img.youtube.com/vi/-5iYmtBItC8/0.jpg" data-holder-rendered="true">
                           </a> <h4 class="media-heading" id="media-heading">A dwelling place for God: 1 The secure Church</h4>
                            Santosh discusses foundational concepts of faith, emphasizing its importance as the cornerstone of our relationship with God. Within the context of faith, he also explores the idea of a physical dwelling place for God.
                       </div>
                    </div>

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

Using jQuery to switch between different content divs

I'm trying to create a script that allows users to toggle between different posts, showing one at a time. However, I'm running into an issue where clicking on a new post doesn't hide the content of the previous one. How can I modify the code ...

Creating a Cross-Fade Effect in easySlider 1.7 using the Jquery Plugin

Want to achieve a cross-fade effect in easySlider 1.7 Jquery Plugin? Check out this tutorial Easy Slider 1.7 for guidance. Appreciate any help, thanks! ...

Tips for adjusting webpage layout automatically based on window dimensions?

As someone who is new to web development, I am in search of a simple solution that allows my developing page to dynamically resize according to the window size without disrupting the layout. Additionally, I am trying to center the page, but experiencing is ...

Coloring weeks in fullcalendar's two-shift calendar

Can FullCalendar create a calendar with alternating colors for odd and even weeks? Visit the FullCalendar demos here For example, see image below: https://i.sstatic.net/D5qza.png ...

Looking to showcase a .tif image in your Angular project?

This code is functioning properly for .png images. getNextImage(imageObj:{imageName:string,cityImageId:number,imgNumber:number}):void{ this.imgNumber= imageObj.imgNumber; this.imagePath=`assets/images/${imageObj.imageName}.png`; this.cityIma ...

Adjust the color of a label based on a set threshold in Chart.js

Can anyone help me with my Chart.js issue? Here is a link to the chart: https://i.sstatic.net/RL3w4.gif I am trying to change the color of the horizontal label when it falls between 70.00 - 73.99. Does anyone know if there's a specific option for th ...

Tips on organizing and designing buttons within a canvas

let canvas = document.getElementById("canvas"); let context = canvas.getContext("2d"); // for canvas size var window_width = window.innerWidth; var window_height = window.innerHeight; canvas.style.background="yellow" canvas.wid ...

Arrange matching divs from two columns on the same row

My webpage features 2 columns: The first column displays questions along with their previous answers, while the second column also shows the same questions but with input fields for new answers. This setup is designed for comparison purposes. However, due ...

The CSS :lang() selector targets elements within documents that do not specify a particular language

Can elements that do not have a language set or inherited, meaning they are in an unspecified ("unknown") language, be targeted? Facts The language of an HTML document or element can be specified using the HTML lang attribute, for example: <html lang=& ...

What is the best way to initiate a new animation from the current position?

Here is my custom box: <div class="customBox"></div> It features a unique animation: .customBox{ animation:right 5s; animation-fill-mode:forwards; padding:50px; width:0px; height:0px; display:block; background-color:bla ...

A `div` element with a height set to 100%, preventing the content from being scrollable

I've been struggling to make my content area (height:100%) scrollable, but have had no success. Despite trying various solutions, nothing seems to work. I'm using devextreme from DevExpress, but it shouldn't affect the CSS. I've set up ...

Altering the appearance of the xy axis on a line chart in Chart.js version 4 by either removing it entirely or adjusting its color

I am facing an issue with my chart.js code where I am trying to remove both the axis lines from the graph but still display the grids (NOTE) ` const MAINCHARTCANVAS = document.querySelector(".main-chart") new Chart(MAINCHARTCANVAS, { type: 'line&apo ...

Certain content appears oversized on Android devices, yet appears appropriately sized on desktop computers

I am experiencing an issue with a webpage where the text appears normal on desktop but is too big on Android devices. Below is the code snippet causing the problem: <!DOCTYPE html> <html> <head> <title>ra ...

Create a layout where a flexbox container is nested under another div and achieve the desired positioning

<style> .container{ display: flex; gap: 5px; flex-direction: row; justify-content: space-around; flex-wrap: wrap; overflow:auto; } .container .one{ background-color: blue; ...

The values in my JavaScript don't correspond to the values in my CSS

Is it possible to retrieve the display value (display:none; or display:block;) of a div with the ID "navmenu" using JavaScript? I have encountered an issue where I can successfully read the style values when they are set within the same HTML file, but not ...

Automatically wrapping and centering characters within pre tags in HTML

I decided to add a box to highlight certain queries on a specific page, rather than the entire website. In order to test out this change, I added an inline style. I found that I had to adjust the characters within the pre tags in order to make them fit ins ...

Unable to modify the text color within a moving button

Working on a school project and implemented an animated button style from w3 schools. However, I'm struggling to change the text color within the button. Being new to HTML, I would greatly appreciate any insights or suggestions on what might be going ...

resizing: border box and height

I'm experimenting with a simple border box here, but the height of my box doesn't seem to be working as expected. * { box-sizing: border-box; } .div1 { width: 500px; height: 200px; border: 5px solid #E18728; float: left; } ...

What is required to create a basic application that can function offline while featuring an HTML/CSS user interface?

Newbie inquiry: I am interested in creating a small application that can run offline on a desktop computer. The amount of data to be saved is minimal, so I have the option to use a file or some type of database. However, my main question is: What languag ...

Using a JavaScript loop to modify the color of the final character in a word

I am curious to find out how I can dynamically change the color of the last character of each word within a <p> tag using a Javascript loop. For example, I would like to alter the color of the "n" in "John", the "s" in "Jacques", the "r" in "Peter" ...