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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:28:07+00:00 2026-06-18T15:28:07+00:00

As the title would suggest I need to make a CSS Grid without losing

  • 0

As the title would suggest I need to make a CSS Grid without losing float, since that would interfere with the Waypoints JS Plugin…

Anyway, I stumbled upon display: inline-block; but if the boxes in the grid take up 100% of the width of the container this only works if you write all the Code in one Line (JSFiddle 1)

Since my Project is a Template, I can’t just force the user to write all his Code in one Line.

Is there any way to solve this problem?

Udate 1:

white-space: nowrap; doesn’t help me either because it screws up all the text within the element (JSFiddle 2)

Udate 2:

This font-size: 0; Solution doesn’t help me because i also need text in the Parent Element

  • 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-18T15:28:08+00:00Added an answer on June 18, 2026 at 3:28 pm

    Update:

    Working example on jsFiddle.

    Setting a font-size: 0; to the parent element, then setting it back to the desired size on the containing element will fix the problem. Also be sure to use vertical-align: top; on the containing elements so unequal lines of text will both start at the same position at the top.

    Note: if you need the two divs to appear in equal height (due to background colors, image, etc.) you’ll need to use the faux columns technique.

    .left {
        background: red;
        height: 140px;
        width: 55%;
        margin: 0 5% 0 0;
        display: inline-block;
        font-size: 14px;
        vertical-align: top;
    }
    .right {
        background: orange;
        height: 140px;
        width: 40%;
        display: inline-block;
        font-size: 14px;
        vertical-align: top;
    }
    section {
        background: black;
        width: 100%;
        margin: 0 0 20px;
        color: #ffffff;
        font-size: 0;
    }
    

    Fix if the divs do not contain text:

    Working example on jsFiddle.

    Add white-space: nowrap; to the section rule:

    section {
        background: black;
        width: 100%;
        margin: 0 0 20px;
        white-space: nowrap;
    }
    

    For more information on the white-space property, see: http://www.quirksmode.org/css/whitespace.html

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

Sidebar

Related Questions

As the title suggest, I would like to do the above. Example below: library(stringr)
I could barely find a reasonable title that would explain my issue, let alone
I need to change the firefox window title like I would do for internet
i need to make a page that will have a request dialog for a
As you may see from the title, for some reason I need to make
In html I need to copy the text that is in the title tag,
As the title suggests I would like to convert a long number to the
As the title suggests, I would like to get the last word out of
As described in the title I would like to develop a Windows Forms Application
Possible Duplicate: When to Use Static Classes in C# Questions in the title..........i would

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.