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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:51:51+00:00 2026-06-16T07:51:51+00:00

Goal: Responsive CSS circles that: Scale with equal radius. Radius can be calculated by

  • 0

Goal:

Responsive CSS circles that:

  1. Scale with equal radius.
  2. Radius can be calculated by percent.
  3. Radius can be controlled by media queries.

If solution is javascript, I still need to emulate media query triggers. I dont ‘need’ media queries but I do want the ability to control the radius by percentage at certain widths:

@media (max-width : 320px) 
{
    .x2{padding: 50%;}
}

@media (min-width : 321px) and (max-width : 800px)
{
    .x2{padding: 25%;}
}

@media (min-width: 801px)
{
    .x2{padding: 12.5%;}
}

Here is what I have so far:

http://jsfiddle.net/QmPhb/

<div class="x1">
    <div class="x2">
        lol dude      
    </div>
    <div class="x2"></div>
    <div class="x2"></div>
    <div class="x2"></div>
</div>

.x1
{
    float:left;
    width:100%;
}

.x2
{
    display:block;
    float:left;
    padding: 12.5%;          //Currently being used to control radius.
    width:auto;
    height:auto;
    border-radius:50%;
    -moz-border-radius:50%;
    -webkit-border-radius:50%;
    -khtml-border-radius: 50%;
    background:#eee;
    text-align:center;
}

Problems:

In this solution, when content is added to a circle:

  • The shape contorts when scaled past it’s available padding.
  • Increases the size of the radius.

Update:

I’ve built a working solution for this here:
Responsive CSS Circles

  • 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-16T07:51:53+00:00Added an answer on June 16, 2026 at 7:51 am

    Solution:

    http://jsfiddle.net/WTWrB/

    The DIV structure:

    We use overflow:hidden in .x2 for spill off background colors in .x3
    of child elements.

    Notice the content starts inside of .x3

    <div class="x0">
        <div class="x1">
            <div class="x2">
                <div class="x3">
                    <!-- BEG Content -->
                    <div class="x4">
                        dude
                    </div>
                    <div class="x6">
                        <div class="x7">
                            dude
                        </div>
                        <div class="x8">
                            dude
                        </div>
                    </div>                
                    <div class="x5">
                        dude
                    </div>
                    <!-- END Content -->
                </div>
            </div>
            <div class="x2"></div>
            <div class="x2"></div>
            <div class="x2"></div>
        </div>
    </div>
    

    The CSS:

    @media (max-width: 320px)
    {
        .x2 {padding: 50%;}
    }
    
    @media (min-width: 321px) and (max-width: 800px)
    {
        .x2 {padding: 25%;}
    }
    
    @media (min-width: 801px)
    {
        .x1 {width:800px}
        .x2 {padding: 12.5%;}
    }
    .x0 {
        float:left;
        width:100%;
    }
    .x1 {
        margin:0px auto;
    }
    .x2 {
        overflow:hidden;
        display:block;
        float:left;
        width:auto;
        height:auto;
        position: relative;
        border-radius:50%;
        -moz-border-radius:50%;
        -webkit-border-radius:50%;
        -khtml-border-radius: 50%;
        background:#eee;
    }
    .x3 {
        position: absolute;
        width: 100%;
        left: 0;
        top:0;
        font-size: 100%;
        float:left;
        height:100%;
        background-color:red;
    }
    /* BEG Content */
    .x3 div{float:left;}
    .x4,.x5,.x6 {
        width:100%;
    }
    .x7,.x8 {
        width:50%;
        float:left;
        height:100%;
    }
    .x4,.x5,.x7,.x8 {
        text-align:center;
    }
    .x4 {
        background-color:blue;
        height:20%;
    }
    .x5 {
        background-color:yellow;
        height:20%;
    }
    .x6 {
        height:60%;
    }
    .x7 {
        background-color:green;
    }
    .x8 {
        background-color:orange;
    }
    /* END Content */
    

    Responsive CSS Circles

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

Sidebar

Related Questions

My goal is to come up with a portable urllib2 solution that would POST
My main goal is to generate an XML file that can be downloaded. The
Goal : I wants when I drag image it become fade so we can
Goal is to make a dialog that appears on menu_key pressed, but it keeps
Goal: Produce an Excel document with information from 3 associated models that is similar
Goal: to create a percentage column based off the values of calculated columns. Here's
I have a scenario that I'm trying to turn into a more responsive UI
Goal: To use entity framework with N-tier in my WPF application. Problem: I can't
My goal is a simple polling system where users can create a poll question,
My goal is that I want to log into a site with some java

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.