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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:19:34+00:00 2026-05-17T01:19:34+00:00

In my code below, case #1 works correctly. The advice-area div stays to the

  • 0

In my code below, case #1 works correctly. The “advice-area” div stays to the right of the “rating-box”.

However, case #2 does not work when the text extends beyond one line. This causes the “advice-area” div to move below the “rating-box”

What is the best way to fix this? Thanks.

<html>
<head>
   <style type="text/css">
    .wrapper {
        width: 400px;
        list-style: none;
    }
    .row {
        border-bottom: 1px solid #E5E5E5;
        padding: 15px  0;
        font-size: 14px;
        clear: both;
    }
    .rating-box {
        float: left;
        height: 70px;
        position: relative;
        width: 60px;
    }
    .thumbs {
        float: right;
        width: 20px;
    }
    .number {
        position: absolute;
        top: 16px;
        left: 5px;
    }
    .advice-area {
        display: inline-block;
        margin-left: 35px;
    }
    .advice-content {
        font-size: 16px;
        margin: 0 0 10px 0;
    }
    .advice-action {
        display: inline-block;
    }
    .add-box {
        display: inline;
        margin-left: 30px;
    }
    .add-box a {
        display: inline-block;
    }
    .share-button {
        display: inline;
        margin-left: 30px;
        cursor: pointer;
    }
    .flag {
        display: inline;
        margin-left: 30px;
        cursor: pointer;
    }
   </style>
</head>

<body>
    <ul class="wrapper">
        <li class="row">
            <div class="rating-box">
                <div class="thumbs">
                    <div> Up </div>
                    <div> Down </div>
                </div>
                <div class="number">1</div>
            </div>
            <div class="advice-area">
                <div class="advice-content">Case #1: This is correct</div>
                <div class="advice-action">
                    <div class="add-box"><a href="#">Plan</a></div>
                    <div class="share-button"><a href="#"> Share </a> </div>
                    <div class="flag"> <a href="#">Flag</a> </div>
                </div>
            </div>
        </li> 
        <li class="row">
            <div class="rating-box">
                <div class="thumbs">
                    <div> Up </div>
                    <div> Down </div>
                </div>
                <div class="number">2</div>
            </div>
            <div class="advice-area">
                <div class="advice-content">Case #2: But this really long text does not want to stay right next to the "Up" and "Down" links</div>
                <div class="advice-action">
                    <div class="add-box"><a href="#">Plan</a></div>
                    <div class="share-button"><a href="#"> Share </a> </div>
                    <div class="flag"> <a href="#">Flag</a> </div>
                </div>
            </div>
        </li>
    </ul>
</body>

  • 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-05-17T01:19:35+00:00Added an answer on May 17, 2026 at 1:19 am

    I’d restrict the width for the .advice-content or .advice-area div (or whatever div is around the content you’re floating).

    When you enter text into a floated div the div will auto-size its width accordingly, and if it expands too wide it’ll automatically wrap over to the next line. Think about how wrapping works for words in text.

    So, all you need to do is to restrict the width of that particular div, and it’ll never grow wide enough to wrap to the next line.

    Unless if you’re in IE: in which case it’ll do whatever the hell it wants 😉

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

Sidebar

Related Questions

Code below does not run correctly and throws InvalidOperationExcepiton . public void Foo() {
Code below is not working as expected to detect if it is in design
The code below works. But if I comment out the line Dim objRequest As
The code below gives an error: Property 'Int32 Key' is not defined for type
The code below is the code i am using. It works fine in thunderbird
See code below, for some reason it only works when I put a breakpoint
The following code works great in IE, but not in FF or Safari. I
The code below shows a sample that I've used recently to explain the different
The code below gives me this mysterious error, and i cannot fathom it. I
The code below continues many lines until it ends with a expected /veotherwise /vechoose.

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.