Troubleshooting problem with Bootstrap inline formatting

Currently, the elements in the card are displayed inline, which is working fine. However, I am attempting to align this div

<div class="d-inline-flex align-top">
inline with the image, but not with each other.

I have tried removing the d-inline class, but now the text is going underneath the image.

<div class="card-body">
       <div class="d-inline-flex"><img src="{{$estate->image}}" id="image"></div>
       <div class="d-inline-flex align-top">
            <h2>{{$estate->building_name}}</h2>
            <p>{{$estate->address}}</p>
            <p>{{$estate->extend}}</p>
            <p>{{$estate->rooms}}</p>
       </div>
</div>

For reference, here is the jsfiddle link.

Answer №1

Add the d-flex class to the "card-body" div.

Remove the d-inline-flex class from it.

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<div class="card text-left">
  <div class="card-header">
    <ul class="nav nav-tabs card-header-tabs">
      <li class="nav-item">
        <a class="nav-link active" href="#">リスト</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">物件概要</a>
      </li>
      <li class="nav-item">
        <a class="nav-link disabled" href="#">Disabled</a>
      </li>
    </ul>
  </div>
  <div class="card-body d-flex">
    <div class=""><img src="https://dummyimage.com/120x120/000/fff" id="image"></div>
    <div class="align-top">
      <h2>{{$estate->building_name}}</h2>
      <p>{{$estate->address}}</p>
      <p>{{$estate->extend}}</p>
      <p>{{$estate->rooms}}</p>
    </div>
  </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

CSS ISSUE: Issue with hidden overflow causing white space next to border in nested divs

When working with a div inside another div and setting overflow to hidden, you may notice a whitespace issue around the border when zooming in and out on Chrome. Firefox handles this situation better, showing white space only in the corners of the border. ...

Change the color of divb using CSS when diva is hovered over

Is it possible to change the color of the second class to white when the first class is hovered over? <div class="diva">This is the first class</div> <div class="divb">This is the second class</div> <style> .diva:hover + .d ...

Is it possible to protect assets aside from JavaScript in Nodewebkit?

After coming across a post about securing the source code in a node-webkit desktop application on Stack Overflow, I began contemplating ways to safeguard my font files. Would using a snapshot approach, similar to the one mentioned in the post, be a viable ...

Are there any methods to improve the coding, align images to the center, and ensure that elements stay in their designated positions?

Is there a way to tidy up the code, center images, and keep everything in place? This is the look I desire: The main outer box should remain centered on the browser page. Pause, play, and stop buttons should float to the left of the box. My image sh ...

Step-by-step guide on importing popper.js

While it may seem like a simple question, I am struggling to find the answer. How can I import popper.js that comes with Bootstrap 4 beta? I am using Bower and have successfully installed Bootstrap 4 beta. However, in the bower_components folder, there is ...

Creating HTML code for a mobile responsive design

I am facing an issue with my clinic webpage where the images appear differently on PC and mobile devices. I am new to HTML and CSS, so I tried using max-width: 100% but it didn't work. The code was originally created by someone else and I need help fi ...

Is there a way to define the width of an element within the display:flex property in CSS?

Could you please review the following: https://codepen.io/sir-j/pen/dyRVrPb I am encountering an issue where setting the input [type=range] to 500px doesn't seem to make a difference from 100px, 500px, or 800px. This leads me to believe that display ...

Tips for creating a stylish, blurred, and centered box for a login form on a full-size background that is also responsive

I attempted to create a login form on an HTML page using Angular, featuring a full-size background image that is centered. The form itself is contained within a div with a blurred background, also centered both horizontally and vertically within the browse ...

Is it possible for webdriver to retrieve the URL of the style sheet being utilized by a specific element?

Currently, I am working on a test scenario where I need to confirm that altering an option in a dropdown menu modifies the styling of the page. I am curious if Webdriver has the ability to retrieve the URL of the CSS document from an element. This appear ...

Saving user input as a local variable to be utilized on a different web page

I am attempting to capture a user input from a form and then utilize that variable on a separate page. This process should be straightforward, but I am not receiving any results and I am unsure of the reason why. Here is the code on the first page: <di ...

The styling of Div remains unchanged by CSS

Currently, I am working on a website using HTML and CSS. I have created a division element and applied a class to it called profile_pic. However, when I make changes to this class in the CSS file, it does not reflect on the div. It seems like the styling ...

Transforming a dynamic HTML layout into a non-responsive one: "RESPONSIVE NO MORE"

I'm currently working with an HTML document that has a responsive design. However, I now need to make it non-responsive. Can someone advise me on the most efficient and fastest way to do this? I attempted using min-width for both html and body, but ...

What are the steps to achieve form styling using Bootstrap?

I am trying to achieve a specific style using the Bootstrap framework. I have been able to achieve something similar to what I want, but the issue is that the save button is not aligned to the right and is not taking up the available width. There is a gap ...

Creating a personalized circular progress bar using React

I am looking to replicate this specific design using React and React Native [![enter image description here][1]][1] After attempting to implement it with the React Circle Progressbar package from here, I have not been successful in achieving the desired ...

Issues with FF6 CSS Javascript MozBorderRadius functionality not functioning as expected

While attempting to set the border radius using JavaScript in Firefox 6, I'm experiencing some issues. Interestingly, when I use the same code with WebkitBorderRadius on Safari, it works perfectly. that.element.style.WebkitBorderRadius = '10px&a ...

Is it possible in CSS to ensure consistent width across various platforms and devices, regardless of their physical dimensions?

When it comes to altering the width (or any other properties) of an element using @media queries, there are multiple approaches available. One option is to utilize aspect pixel ratio, device width, and height. Find out more at https://developer.mozilla.or ...

Customizing the underlineFocusStyle of a material-ui TextField component using regular CSS styling

When working with Material-UI components, you have the option to provide a style object for the component itself within the JSX tag. However, in certain cases like the underlineFocusStyle of a TextField component, you need to use a separate style object. ...

Is resizing images using HTML/CSS more effective than tools like Fireworks?

Usually, I start by creating an image in Fireworks, adjusting it to fit the right dimensions for the website, and then exporting it as either a JPG or PNG file. This process has always worked well for me. Lately, I've observed that when I insert a la ...

The width of the Chrome iPhone 6 emulator exceeds that of the actual device, stretching to 100

Within the body element, I have a component called app. Even though the app element is set to have a width of 100%, when I check the page using the iPhone 6 emulator in Chrome, I notice that the app component extends beyond the viewport, causing an overfl ...

Display a section of the picture at maximum width

Can anyone help with displaying only a portion of an image at full width (100%) without any overflow issues? The code I've tried is not working: .intro_sea { position: absolute; width: 101%; clip-path: inset(30% 50% 0 0); margin: 0; paddi ...