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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:46:25+00:00 2026-06-01T03:46:25+00:00

I am trying to create a CSS theme switcher button like below. The top

  • 0

enter image description here

I am trying to create a CSS theme switcher button like below. The top image shows what I have so far and the bottom image shows what I am trying to create.

I am not the best at this stuff I am more of a back-end coder. I could really use some help.

I have a live demo of the code here http://dabblet.com/gist/2230656

Just looking at what I have and the goal image, some differences.

  • I need to add a gradient
  • The border is not right on mine
  • Radius is a little off
  • Possibly some other stuff?

Also here is the code…it can be changed anyway to improve this, the naming and stuff could be improved I am sure but I can use any help I can get.

HTML

<div class="switch-wrapper">
    <div class="switcher left selected">
        <span id="left">....</span>
    </div>
    <div class="switcher right">
        <span id="right">....</span>
    </div>
</div>

CSS

/* begin button styles */

.switch-wrapper{
    width:400px;
    margin:220px;
}

.switcher {
    background:#507190;
    display: inline-block;
    max-width: 100%;
    box-shadow: 1px 1px 1px rgba(0,0,0,.3);
    position:relative;
}

#left, #right{  
    width:17px;
    height:11px;
    overflow:hidden;
    position:absolute;
    top:50%;
    left:50%;
    margin-top:-5px;
    margin-left:-8px;
    font: 0/0 a;

}
#left{
    background-image: url(http://www.codedevelopr.com/assets/images/switcher.png);
    background-position: 0px 0px;
}
#right{
    background-image: url(http://www.codedevelopr.com/assets/images/switcher.png);
    background-position: -0px -19px;
}


.left, .right{
    width: 30px; height: 25px;
    border: 1px solid #3C5D7E;
}

.left{
    border-radius: 6px 0px 0px 6px;
}
.right{
    border-radius: 0 6px 6px 0;
    margin: 0 0 0 -6px
}

.switcher:hover,
.selected {
    background: #27394b;
    box-shadow: -1px 1px 0px rgba(255,255,255,.4),
     inset 0 4px 5px rgba(0,0,0,.6),
      inset 0 1px 2px rgba(0,0,0,.6);
}
  • 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-01T03:46:26+00:00Added an answer on June 1, 2026 at 3:46 am

    You could do a combination of border-radius rules for each browser. However, I find this to be way too tedious for small images like that. Do a .png or .jpg sprite, then set the background-position on :hover and :active

    For example:

    #right { background: url() top right; }
    #right:hover { background-position: center right; }
    #right:active { background-position: bottom right; }
    
    #left { background: url() top left; }
    #left:hover { background-position: center left; }
    #left:active { background-position: bottom left; }
    

    Okay, here is some modification done with css.

    dabblet.com/gist/2231617

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

Sidebar

Related Questions

I'm trying to create a run time css-based swf which DOES NOT have embedded
I am trying to create a css menu. I would like to remove border
I am trying to create a style switcher. What I would like to do
I'm trying to create a top menu in my Wordpress theme, similiar to http://mailchimp.com/
I am trying to create a button using CSS Gradients plus a icon that
I am trying to create some HTML/CSS for footer navigation. What I would like
I'm trying to create a simple image navigation for my site, using CSS to
I'm trying to create a CSS for these lines, but they are not working
I'm trying to create a pure css Venn diagram like this Where the circle
I'm trying to create a design where I have a div for an image,

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.