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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:51:03+00:00 2026-05-23T03:51:03+00:00

I have a page with a float: right ‘ed div at the top, and

  • 0

I have a page with a float: right‘ed div at the top, and a text-align: center‘ed div right underneath it. Is it possible to make the floated div not alter the flow of the other div (the one right below it)?

Here are two fiddles that show what I’m seeing (I like neither, they are explained in the next paragraph):
off-center -> http://jsfiddle.net/5XMVt/
centered but gaping hole -> http://jsfiddle.net/CSGQn/

If left alone, the bottom div is pushed left (out of the center) by the floated div. I could do clear: both on the bottom div but that would push it down below the floated div, and even though this is better than being off-center, it’s suboptimal because it creates a giant hole right above it. I need the floated div not to alter the flow of the div below it at all, like it’s not even there.

I was also thinking about doing position: absolute; but that would only work if the div were supposed to be on the left side, when it’s supposed to be on the right side.

What I would like is like the first fiddle except with the ‘should be centered’ text actually centered.

  • 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-23T03:51:04+00:00Added an answer on May 23, 2026 at 3:51 am

    You can set the right-floated div with position:absolute

    And set the right:0, that will give it the same behavior as floating it to the right.

    Note that this will only work if the div has to be at the right of the page, not a container.

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

Sidebar

Related Questions

I want my page to have 3 blocks: LEFT CENTER RIGHT. I want block
I have a web page with a right floated navigation panel and content that
I have a page where there is a column and a content div, somewhat
I have a page where I need a piece of text to appear aligned
I have a page that has three divs one at the top, one at
I have a master page in C#, where I have this code: <div style=width:
I have a link inside a div that floats to the right of the
Hello its my code where I giving out paging of view: <div style=float: right;>
I have a float element on the left side on my page. Now after
I have a container div which is centred at 50% of the page width.

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.