Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8380837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:33:31+00:00 2026-06-09T16:33:31+00:00

I have two block elements. The first is floated to the left. I’d expect

  • 0

I have two block elements. The first is floated to the left. I’d expect the right element to be a block as well and retain its square shape. Instead, text within it is wrapping under the element which is floating to the left.

.comment-date {
  float: left;
}
<div class="comment-date">07/08 23:08</div>
<div class="comment-body">
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
</div>

The lorem ipsum text wraps under the date. I’d expect it to retain a block shape, floating to the right of the date. How can I achieve that?

Here is a fiddle:
http://jsfiddle.net/CS2Hs/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:33:32+00:00Added an answer on June 9, 2026 at 4:33 pm

    An alternative to the other solutions here would be to simply add a margin-left to .comment-body. It would also be helpful to apply a set width to .comment-date

    .comment-date { 
      float: left;     
      font-weight: bold;    
      width: 90px;
    }
    .comment-body {
      margin-left: 90px;
    }
    

    This will ensure that the text in .comment-body does not appear underneath the date.

    Here is a demo:

    — jsFiddle DEMO —

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two DIV elements. HTML looks like this: <div id=first><div id=second></div></div> The CSS
I have two block (like Block1 and Block2) and I have to display one
I have two blocks in HTML5 canvas. Blue Block ie fixed in the canvas
I have the following two code blocks. Code block 1 var checkboxes = $(div.c1
I have an abstract entity called Block which contains two attributes: column and order
I have the same block of code repeated with two different variables. This block
I have two tables: block: int id, [other columns...] blockInstance: int id, int blockId
the first two keys are operational (leftmost key, and the black key right next
I have an input[type=radio] element inside a block container of fixed width. The supporting
I have two elements on a page that I'd like to animate via CSS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.