Creating well-sized images using Bootstrap 3 column dimensions

While achieving this layout with CSS alone is simple, I'm having trouble implementing it using Bootstrap.

I am looking to have an image where the text wraps around it, either floated left or right. However, I want the image to span 3 columns for medium and large screens, while filling a single column for extra small and small screens.

So, for larger screens, something like this (please excuse my rough sketch):

Currently, I have managed to make it work somewhat... but it seems to only span 2 columns instead of 3:

<div class="row">
  <div class="col-md-10 col-md-offset-1">
    <div class="row">
      <h2>About Them Guys</h2>
      <p class="intro">Home is where you hang your hat. Flank shank bacon, fatback boudin ham tongue beef ribs pig brisket pancetta frankfurter. Jerky pig biltong, chicken hamburger swine corned beef beef ribs beef jowl.</p>

      <div class="col-md-11 col-md-offset-1">

       <p><img src="http://img690.imageshack.us/img690/5169/36ng.png" class="col-md-3 img-responsive pull-left" alt="" />Bacon ipsum dolor sit amet short loin jerky salami sausage, hamburger t-bone doner filet mignon sirloin beef. Tail short ribs jerky leberkas prosciutto pastrami fatback jowl turkey t-bone bacon. Hamburger tail tri-tip, ribeye ham hock leberkas meatball pig short ribs jerky meatloaf. Flank shank bacon, fatback boudin ham tongue beef ribs pig brisket pancetta frankfurter. Jerky pig biltong, chicken hamburger swine corned beef beef ribs beef jowl. Kevin cow turducken, pancetta fatback swine pig boudin ball tip kielbasa venison. Pig salami capicola chuck pancetta pork.</p>

      </div>
    </div> <!--row-->
  </div> <!--col offset-->
</div> <!--row-->

If the entire paragraph is offset by a column, does the image col-md-3 count that first column offset as "1"? If I use col-md-4, then it does span the 3 columns - just making sure there's nothing I'm overlooking.

Thank you!

Answer №1

This should be functioning properly

<div class="row">
      <div class="col-md-10 col-md-offset-1">
        <div class="row">
          <h2>About Them Guys</h2>
          <p class="intro">Home is where you hang your hat.  Flank shank bacon, fatback boudin ham tongue beef ribs pig brisket pancetta frankfurter. Jerky pig biltong, chicken hamburger swine corned beef beef ribs beef jowl.</p>

          <div class="col-md-11 col-sm-12 col-xs-12 col-md-offset-1">

           <p><img src="http://img690.imageshack.us/img690/5169/36ng.png" class="col-md-3 img-responsive pull-left" alt="" />Bacon ipsum dolor sit amet short loin jerky salami sausage, hamburger t-bone doner filet mignon sirloin beef. Tail short ribs jerky leberkas prosciutto pastrami fatback jowl turkey t-bone bacon. Hamburger tail tri-tip, ribeye ham hock leberkas meatball pig short ribs jerky meatloaf. Flank shank bacon, fatback boudin ham tongue beef ribs pig brisket pancetta frankfurter. Jerky pig biltong, chicken hamburger swine corned beef beef ribs beef jowl. Kevin cow turducken, pancetta fatback swine pig boudin ball tip kielbasa venison. Pig salami capicola chuck pancetta pork.</p>

          </div>
        </div> <!--row-->
      </div> <!--col offset-->
    </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

A simple guide to viewing a sequential list of loaded stylesheets in Google Chrome

I've been trying to figure out the loading order of CSS stylesheets in Google Chrome, but I'm finding it a bit confusing. Despite my attempts to use Dev Tools -> Network tab -> filter for Stylesheets, I keep getting different results each t ...

Creating a CSS circle spinner with a half moon shape is an innovative way to add a unique touch

Image: Circular spinner rotating along the border rim of other solid circle For more details, please visit: https://codepen.io/sadashivjp/pen/oqqzwg I have created a UI codepen here and welcome any modifications or solutions. The code snippet is provided ...

Sleek design featuring a header, footer, Left Menu, Content, and RightMenu implemented on Bootstrap 4-5

Can you help me create a minimal layout using Bootstrap 4-5 with a header, footer, LeftMenu, Content, and RightMenu? The combined width of LeftMenu, Content, and RightMenu should be similar to the main block on the current site (htmlforum.io). This means ...

Fade out a dynamically loaded content block using jQuery

I am currently developing a small app and encountering issues with deleting (fading out) dynamically loaded div elements using jQuery. The problem occurs when adding a new content box. If the page is reloaded and the content box is rendered normally (from ...

What is the best method to retrieve the initial element in a jQuery slider rotation?

I am trying to vertically center all my images with a height less than 531 pixels within my cycles: before : function(currSlideElement, nextSlideElement, options, forwardFlag){ foto = $(nextSlideElement).find('img'); alert(foto.height()) ...

What is the best way to calculate the pixel height of an element when the height is specified in vh units?

element lies this inquiry: In my JavaScript code for developing Windows 8 apps, I have set the max-height of an element to 65vh. I now require a method to convert this value into pixels in order to determine if an image can adequately fit within this spac ...

The design became distorted when the fonts were resized in every browser

Looking for assistance with a simple layout issue. When I scale the font in browsers by using CTRL and scrolling up (zooming), the layout does not behave as expected. I want #allWrapper to scale its dimensions with the body so that the white background ex ...

What is the best way to arrange a bootstrap .container?

I've been struggling to position a content DIV on a bootstrap carousel, but so far I haven't been successful in figuring it out. Below is a screenshot of the current output from my code, which is not what I am aiming for. What I'm trying t ...

Automatic closure of the div tag in JavaScript

I am revamping my website to a more modern web application, and here is the HTML code I am using: <joexn-profile> <joexn-logo></joexn-logo> <joexn-text></joexn-text> </joexn-profile> Additionally, here is the JavaScrip ...

Show and hide a div with the click of a button

As I embark on rebuilding a website from the ground up, I find myself pondering how to achieve a specific functionality: My goal is for another view to appear when one of two buttons is clicked. How can this be accomplished? I attempted the following app ...

Center align text in the uib-progressbar

Is it possible to center align text in the uib-progressbar? I attempted using position:absolute, but I would like to display a list of progress bars in a UI grid that includes scrollable content. The goal is for the text to remain fixed while the progress ...

Achieve a stunning visual effect by gradually blending the background image in a parallax

Adding some parallax scrolling background images to my site using this awesome plugin: Looking to achieve a fade out effect on user scroll, similar to what is seen on this cool website: Tried implementing the code below but it doesn't seem to work d ...

Chat box custom scrollbar always positioned at the bottom

I have a personalized chat box where I included overflow-y for scrolling functionality. However, every time I input a message in the text box, it displays at the top of the scrollbar window. Is there a way to automatically show the most recent message I ...

Unique Version: "Tailored sass compilation of Bootstrap 5 devoid of any theme or component elements"

My goal is to create a customized bootstrap build utilizing only the utility classes and grid system. No components, colors, or themes required - just focusing on layout and spacing. Does anyone have any resources, documentation, or a successful setup they ...

A div positioned to the left is placed beneath another div

I am faced with a design challenge involving two divs. The first div is floated left, while the second div is floated right. In order to achieve a responsive layout, I need the first div to go under the second div when the viewport changes. Both divs conta ...

Issue with Bootstrap 2-column layout not functioning properly on mobile devices

I have been working on Bootstrap and I am facing an issue with the positioning of two badges. Currently, one badge appears on the right side and the other on the left side. Although I tried adjusting the left property, it causes overlapping when the size ...

Responsive Bootstrap table unable to expand div upon clicking

My bootstrap responsive table has a unique functionality that allows specific divs to expand and collapse upon button click. While this feature works seamlessly in desktop view, it encounters issues on mobile devices. CSS .expandClass[aria-expanded=true] ...

"Creating a Large Content Menu with Bootstrap: A Step-by-Step Guide

I am looking to create a dynamic mega-menu using Bootstrap that will include categories with multiple sub-categories, each containing various links and images. After reviewing the Bootstrap nav documentation, I am unsure of how to achieve this complex nav ...

Swap out the default white/blank box in Bootstrap

Hello, I am new to using bootstrap and trying to enhance my skills. Currently, I have created 5 boxes - two on the left side and three on the right side. However, I have a few questions regarding their display. Firstly, I notice that box number '5&ap ...

Error encountered in WebStorm SCSS compiler related to transition and transform properties

https://i.sstatic.net/tWouB.png In my quest to build a webpage, I've encountered an issue while trying to incorporate images with transform/transition effects. The Scss compiler in WebStorm is throwing me an error. How can I resolve this problem? Pl ...