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 is an object that I'd like to use with ng-repeat, but it's not
Here is the code: create table `team`.`User`( `UserID` bigint NOT NULL AUTO_INCREMENT , `Username`
Here is my SQL script CREATE TABLE tracks( track_id int NOT NULL AUTO_INCREMENT, account_id
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here is the problem that I am trying to solve. I have two folders
Here is my program to find all the subsets of given set. To solve
Here's the section for every other bot besides Google and co. # Every bot
Here is function that I'm using for recursively deleting folders and files function rmdir_recursively($dir)
Here is the code that I am using to set the api url: var

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.