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

  • Home
  • SEARCH
  • 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 7738741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:20:43+00:00 2026-06-01T08:20:43+00:00

I have the following less.css ( http://lesscss.org/ ): #content { overflow: hidden; width: 100%;

  • 0

I have the following less.css ( http://lesscss.org/ ):

#content {
    overflow: hidden;
    width: 100%;

    p {
        float: left;
        width: 465px;
        padding: 0px 25px 0px 35px;
        margin: 0px;

        br {
            line-height: 2.5em;
        }
    }

    pre {
        float: none;
        overflow: hidden;
        padding: 0px;
        padding-left: 10px;
        margin: 0px;

        &:after {
            clear: both;
        }
    }
}

… and the following HTML:

        <div id="content">
            <p>This code prints the text 'Hello World!' to a console window and then closes the application. The return 0 part of the application is irrelevant.</p>
            <pre>
//somecode { }
            </pre>

            <p>Highlights a single chunk of CoffeeScript code, using Pygments over stdio, and runs the text of its corresponding comment through Markdown, using the Github-flavored-Markdown modification of Showdown.js.<br/>
            We process the entire file in a single call to Pygments by inserting little marker comments between each section and then splitting the result string wherever our markers occur.</p>
            <pre>
//somecode { }
            </pre>
        </div>

The idea of the previous CSS is that the tags are automatically aligned to the right and the regular text is left to the main column so that it acts as a kind of annotation. If either columns are larger than the other, it will dynamically expand before starting the next group of p and pre elements.

The problem I have is that when I have multiple paragraph elements due to the way they float left with fixed width they tend to overlap each others lines. This has forced me to add my own breaklines, which is silly and I’d really like to get rid of it 🙁

Example (correct):

Example (incorrect):

Can anyone offer a solution so that the paragraphs will align together like the first picture except using actual paragraph tags and not the makeshift br I’m using currently. Containing the paragraphs in another parent div is not an option, as the output that is being displayed is straight from tinymce, which saves groups of text as raw p/pre tags for text and code respectively.

  • 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-01T08:20:45+00:00Added an answer on June 1, 2026 at 8:20 am

    How about:

    p {
        float: left;
        clear: left;
    

    I guess that wouldn’t quite achieve the same layout you’ve got there. Unfortunately, if you’re getting rid of the <br>s, I think you need groups of paragraphs to be inside another tag that’s floated left to achieve your layout, and as you’ve said, that isn’t an option.

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

Sidebar

Related Questions

I have the following css class: .CtractLabel { font-weight:bold; padding: 2px; text-align:left; /* width:120px;
I have the following code in a c++ listener class (more or less), which
I have a following css #container { border:1px solid black; } #container #header {
I have the following JavaScript function function headerBanner(){ var current = $('.bannerImages img:nth-child('+bannerIndex+')').css('display', 'none');
I have the following less mixin: @myColor = #123456; .mixin(@a) when (@a = @myColor){
I have the following text: <i><b>It is noticeably faster.</b></i> <i><b>They take less disk space.</i>
I have the following code: <!DOCTYPE html> <html> <head> <link rel=stylesheet type=text/css media=screen href=jquery-ui-1.8.9.custom.css
So, I was wondering about the following: I have some main content div and
Files: listing.less (text/css) style.less (text/css) Tools: Firefox Firefox addon httpFox for inspecting http headers
I have following code: <div class='parent'> <div class='left-child'></div> <div class=right-child></div> </div> What I want

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.