Technical Flaw in flex-basis and calc


flex-basis: calc(100%-430px);

the way browsers are interprating it I think it’s wrong. where am I commiting technical mistakes.



The plus and minus mathematical operators (the minus sign, in this case) must be surrounded by white space.


Thank you sir. i will remember this now.


Though check IE11 (maybe Edge too). It doesn’t like flex-basis and calc(). Might have an issue there.


It works.


IE11 is ok as long as you don’t use calc in the shorthand version :slight_smile:

flex-grow:1;/* keep separate for ie11 bug */
flex-basis:calc(70% - 1rem);/* keep separate for ie11 bug */


…which is what I do. Good to know :slight_smile: thanks.


I guess this is related to this post I realy wonder if you need flex-basis in the first place


You do for that demo :slight_smile:


@PaulOB. Does he realy need that Paul?. I mean for the layout from the other post or am I missing someting?


This was an Independent question not related to any post.


Ha ok fair enough. Did you fix the other layout. It seem to me that you had a number of unnecessary nested divs


That would be a question for the other thread :slight_smile:

The original idea was to be able to switch column sides, or not output both columns, or nest columns with the simplest amount of css.

In the original demo all changes were achieved with a class change and minimal css.

But we are getting off-topic now :slight_smile:


glancing over this post, so forgive me if someone else has mentioned this before. it’s IMPORTANT to pay attention to white space when using calc();

flex-basis: calc(100%-430px); should be flex-basis: calc(100% - 430px);


Yes that was the first question answered:).

The thread has veered off topic a bit:)


Historical background of the other post in which you are keenly interested is here →

Please read the whole discussion patiently.

I hope that will help. Thanks.


No I was referring to this post: Reorganizing Layout Code | Minimizing the CSS if possible

closed #18

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.