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 7836609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:13:47+00:00 2026-06-02T14:13:47+00:00

Here’s an issue that’s been bugging me all day. I’m not exactly sure how

  • 0

Here’s an issue that’s been bugging me all day. I’m not exactly sure how to describe it other than I’m having an issue with a div floating over a floated container and it seems to be only an issue in Chrome.

Take a look at this: http://jsfiddle.net/H8vVf/ . There should be a stripe next to text but in Chrome, it looks like a strike-through.

HTML:

<div class="wrapper">
    <div class="content">SOME GOOD TEXT</div>
    <div class="stripe"></div>
</div>

CSS:

.wrapper::after {
     content: " ";
     display: block;
}
.content {
     float: left;
}
.stripe {
     background-color: black;
     width: 100%;
     display: inline;
     position: absolute;
     height: 1em;
}​

I’ve figured out a workaround for it but I was just wondering if anyone can explain to me what is going wrong here and why. If not, I’ll just go on my merry way…

  • 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-02T14:13:49+00:00Added an answer on June 2, 2026 at 2:13 pm

    Quote OP:

    I’m having an issue with a div floating over a floated container…

    Normally, when you float: something, the other content on the page should flow around it.

    Quote OP:

    There should be a stripe next to text but in Chrome, it looks like a
    strike-through.

    I’m not sure what you mean by “strike-through”, but you’ve defined the element with class .stripe to be 100% wide which means it will be 100% the width of its parent. In this case, the parent of .stripe is the element with class .wrapper. Since the .wrapper class has no defined width, by default, it will be 100% as wide as its parent which is the window. Therefore, as you’ve defined it, the stripe will be 100% as wide as the window.

    Quote OP:

    I was just wondering if anyone can explain to me what is going wrong here and why.

    Regarding your code…

    .stripe {
         background-color: black;
         width: 100%;
         display: inline;
         position: absolute;
         height: 1em;
    }​
    

    display: inline is a property for elements within the content flow.

    However, position: absolute takes the element out of the content flow.

    It makes no sense this way. In other words, it can’t both be in the flow and out of the flow at the same time.

    Here is the W3C spec which explains the CSS2 Visual Formatting Model as well as a detailed comparison of normal flow, floats and absolute positioning.

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

Sidebar

Related Questions

Here is the issue I am having: I have a large query that needs
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here's my scenario - I have an SSIS job that depends on another prior
Here's a coding problem for those that like this kind of thing. Let's see
Here is the scenario: I'm writing an app that will watch for any changes
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here's the setup - I have a view that lists products. On that same
Here is a scenario: User installs .NET application that you have made. After some
Here is my query: select word_id, count(sentence_id) from sentence_word group by word_id having count(sentence_id)
Here's a sample of a SpinBox that writes its changes to underlying variables. The

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.