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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:18:18+00:00 2026-06-17T08:18:18+00:00

I have a calc definition: #navigation-panel { a, i.navEmptyBlock { // … width: -webkit-calc(12%

  • 0

I have a calc definition:

#navigation-panel {
     a, i.navEmptyBlock {    
        // ...
        width: -webkit-calc(12% - 2px);
        width: -moz-calc(12% - 2px);
        width: -o-calc(12% - 2px);
        width: -ms-calc(12% - 2px);
        width: calc(12% - 2px);

        @media (max-width: 640px) {      
          width: -webkit-calc(20% - 2px);
          width: -moz-calc(20% - 2px);
          width: -o-calc(20% - 2px);
          width: -ms-calc(20% - 2px);
          width: calc(20% - 2px);
        }
        // ...
    }
}

When resized at 640px it should apply the new calc, but it doesn’t.

I’ve inspected with Google Developer Tools and the new calc DOES apply but it’s not overriding the old one for any weird reason.

Developer Tools shows old one crossed out but it’s still applying it!. If I disable the crossed one it works.

Tried in firefox and it works.

It seems chrome doesn’t override -webkit-calc calls?

Generated Code from COMPASS:

#navigation-panel a, #navigation-panel i.navEmptyBlock {
  float: left;
  margin: 0 auto;
  text-decoration: none;
  color: #080808;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  position: relative;
  width: -webkit-calc(12% - 2px);
  width: -moz-calc(12% - 2px);
  width: -o-calc(12% - 2px);
  width: -ms-calc(12% - 2px);
  width: calc(12% - 2px);
  font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
  display: inline-block;
  border: 1px solid #3284b6;
  text-align: center;
  padding-top: 6px;
  height: 25px;
  font-family: Tahoma;
  font-size: 11px;
  /* Windows */
  background: rgba(255, 255, 255, 0);
  -webkit-transition: background 80ms;
  font-weight: 800;
  box-shadow: inset 0px 0px 6px rgba(255, 255, 255, 0.9); }
  @media (max-width: 640px) {
    #navigation-panel a, #navigation-panel i.navEmptyBlock {
      width: -webkit-calc(20% - 2px);
      width: -moz-calc(20% - 2px);
      width: -o-calc(20% - 2px);
      width: -ms-calc(20% - 2px);
      width: calc(20% - 2px); } }

EDIT: The plain width does override the first calc, but second cald overrides the new plain width but does not apply!

  • 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-17T08:18:19+00:00Added an answer on June 17, 2026 at 8:18 am

    Putting the webkit’s prefixes in a repeated selector works somehow.

    a, i.navEmptyBlock {    
            @media (max-width: 640px) {
              // fallback
              width: 18%;
              width: -webkit-calc(20% - 2px);         
            }
            @media (max-width: 565px) {
              // fallback
              width: 19%;
              width: -webkit-calc(20% - 2px);          
            }    
            @media (max-width: 355px) {
              // fallback
              width: 15.5%;
              width: -webkit-calc(20% - 2px);       
            }
          }
        a, i.navEmptyBlock {    
            float: left;
            text-decoration: none;
            color: $nav-panel-font-color;
            text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);   
            position: rela
    

    tive;
    width: 12%;

        width: -moz-calc(12% - 0.18em);
        width: -o-calc(12% - 0.18em);
        width: -ms-calc(12% - 0.18em);
        width: calc(12% - 0.18em);
    
        @media (max-width: 640px) {
          // fallback
          width: 19%;          
          width: -moz-calc(20% - 2px);
          width: -o-calc(20% - 2px);
          width: -ms-calc(20% - 2px);
          width: calc(20% - 2px);
        }
        @media (max-width: 565px) {            
          width: -moz-calc(20% - 2px);
          width: -o-calc(20% - 2px);
          width: -ms-calc(20% - 2px);
          width: calc(20% - 2px);
        }    
        @media (max-width: 355px) {           
          width: -moz-calc(20% - 2px);
          width: -o-calc(20% - 2px);
          width: -ms-calc(20% - 2px);
          width: calc(20% - 2px);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have .cssClass containing: // fallback without calc width: 60%; @media (max-width: 500px) {
I have a the following method definition in my class: virtual Calc* Compile( Evaluator*
In Scala, if I have a simple class as follows: val calc = actor
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have an Open Office Calc Sheet with a column full of data that
if I have class : public class myclass{ public int calc(int var1,int var2){ return
I have the following two script files (i.e., formtest.html and calc.php). When I do
Please help me out on this. I have Javascript like the following: function calc()
I have a form like this: <form name=calc action= id=calc> <?php for($i=0; $i<15; $i++)
i was designing a calculator similar to win 7 calc i have used colspan

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.