Looking for an alternative to flex












0















I am using flex to align a text and two buttons inside a div. This is my code






#wrapper {
background-color: gray;
display: flex;
padding-left: 90px;
padding-right: 90px;
}
#left {
padding-top: 33px;
padding-bottom: 33px;
flex: 0 0 65%;
height: 80px;
line-height: 44px;
}
#right {
padding-top: 45px;
padding-bottom: 45px;
flex: 1;
}
#button1 {
height: 70px;
width: 70px;
margin-right: 20px;
}
#button2 {
height: 70px;
width: 70px;
}

    
<div id="wrapper">
<div id="left">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
</div>
<div id="right">
<input type="button" value="More" id="button1">
<input type="button" value="Ok" id="button2">
</div>
</div>





This code is working properly on most browser but in some others flex is not supported. Is there any other method that can I use to achieve the same result and create the banner?










share|improve this question

























  • use inline-block elements

    – Temani Afif
    Nov 26 '18 at 10:05
















0















I am using flex to align a text and two buttons inside a div. This is my code






#wrapper {
background-color: gray;
display: flex;
padding-left: 90px;
padding-right: 90px;
}
#left {
padding-top: 33px;
padding-bottom: 33px;
flex: 0 0 65%;
height: 80px;
line-height: 44px;
}
#right {
padding-top: 45px;
padding-bottom: 45px;
flex: 1;
}
#button1 {
height: 70px;
width: 70px;
margin-right: 20px;
}
#button2 {
height: 70px;
width: 70px;
}

    
<div id="wrapper">
<div id="left">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
</div>
<div id="right">
<input type="button" value="More" id="button1">
<input type="button" value="Ok" id="button2">
</div>
</div>





This code is working properly on most browser but in some others flex is not supported. Is there any other method that can I use to achieve the same result and create the banner?










share|improve this question

























  • use inline-block elements

    – Temani Afif
    Nov 26 '18 at 10:05














0












0








0








I am using flex to align a text and two buttons inside a div. This is my code






#wrapper {
background-color: gray;
display: flex;
padding-left: 90px;
padding-right: 90px;
}
#left {
padding-top: 33px;
padding-bottom: 33px;
flex: 0 0 65%;
height: 80px;
line-height: 44px;
}
#right {
padding-top: 45px;
padding-bottom: 45px;
flex: 1;
}
#button1 {
height: 70px;
width: 70px;
margin-right: 20px;
}
#button2 {
height: 70px;
width: 70px;
}

    
<div id="wrapper">
<div id="left">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
</div>
<div id="right">
<input type="button" value="More" id="button1">
<input type="button" value="Ok" id="button2">
</div>
</div>





This code is working properly on most browser but in some others flex is not supported. Is there any other method that can I use to achieve the same result and create the banner?










share|improve this question
















I am using flex to align a text and two buttons inside a div. This is my code






#wrapper {
background-color: gray;
display: flex;
padding-left: 90px;
padding-right: 90px;
}
#left {
padding-top: 33px;
padding-bottom: 33px;
flex: 0 0 65%;
height: 80px;
line-height: 44px;
}
#right {
padding-top: 45px;
padding-bottom: 45px;
flex: 1;
}
#button1 {
height: 70px;
width: 70px;
margin-right: 20px;
}
#button2 {
height: 70px;
width: 70px;
}

    
<div id="wrapper">
<div id="left">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
</div>
<div id="right">
<input type="button" value="More" id="button1">
<input type="button" value="Ok" id="button2">
</div>
</div>





This code is working properly on most browser but in some others flex is not supported. Is there any other method that can I use to achieve the same result and create the banner?






#wrapper {
background-color: gray;
display: flex;
padding-left: 90px;
padding-right: 90px;
}
#left {
padding-top: 33px;
padding-bottom: 33px;
flex: 0 0 65%;
height: 80px;
line-height: 44px;
}
#right {
padding-top: 45px;
padding-bottom: 45px;
flex: 1;
}
#button1 {
height: 70px;
width: 70px;
margin-right: 20px;
}
#button2 {
height: 70px;
width: 70px;
}

    
<div id="wrapper">
<div id="left">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
</div>
<div id="right">
<input type="button" value="More" id="button1">
<input type="button" value="Ok" id="button2">
</div>
</div>





#wrapper {
background-color: gray;
display: flex;
padding-left: 90px;
padding-right: 90px;
}
#left {
padding-top: 33px;
padding-bottom: 33px;
flex: 0 0 65%;
height: 80px;
line-height: 44px;
}
#right {
padding-top: 45px;
padding-bottom: 45px;
flex: 1;
}
#button1 {
height: 70px;
width: 70px;
margin-right: 20px;
}
#button2 {
height: 70px;
width: 70px;
}

    
<div id="wrapper">
<div id="left">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
</div>
<div id="right">
<input type="button" value="More" id="button1">
<input type="button" value="Ok" id="button2">
</div>
</div>






html css flexbox






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 '18 at 12:20









Georgi Hristozov

1,166922




1,166922










asked Nov 26 '18 at 9:55









pungispungis

31




31













  • use inline-block elements

    – Temani Afif
    Nov 26 '18 at 10:05



















  • use inline-block elements

    – Temani Afif
    Nov 26 '18 at 10:05

















use inline-block elements

– Temani Afif
Nov 26 '18 at 10:05





use inline-block elements

– Temani Afif
Nov 26 '18 at 10:05












3 Answers
3






active

oldest

votes


















0














You can use a polyfill for the browsers that don't support flexbox. For example: https://github.com/jonathantneal/flexibility



Modernizr has several options listed here: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#flexible-box-layout-spec



That way you can still use flexbox and also support other browsers.






share|improve this answer































    0














    You can achieve the same result using lot of techniques in css, i'll show you some examples:



    Using Inline-block element
    https://codepen.io/joaoskr/pen/OaEdJz



    Using Float left
    https://codepen.io/joaoskr/pen/JeZxXX



    Using table alignment
    https://codepen.io/joaoskr/pen/zMaewv



    As you can see, you have lots of possibility to achieve the same result without use flex, choose which you think better, hope it can help you !!






    share|improve this answer
























    • Thank you. I tried to use the Inline-block element. The problem is that the top and bottom padding is not working on the buttons anymore, do you have an idea about the problem? this is the code codepen.io/kev34/pen/GwGeya

      – pungis
      Nov 26 '18 at 11:01











    • @pungis Add float: left; to the #left and #right element, then add this line #wrapper:after { content: ""; display: table; clear: both; }

      – João Deroldo
      Nov 26 '18 at 11:14





















    0














    Most modern browser versions support flex, however you may want to include some browser specific rules for legacy support.



    -webkit-flex: for Chrome 21.0+/Safari 6.1+



    -ms-flex: for IE10



    -moz-flex: for Firefox 18.0+






    share|improve this answer
























    • flexbox

      – Zohir Salak
      Nov 26 '18 at 12:23











    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53478572%2flooking-for-an-alternative-to-flex%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can use a polyfill for the browsers that don't support flexbox. For example: https://github.com/jonathantneal/flexibility



    Modernizr has several options listed here: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#flexible-box-layout-spec



    That way you can still use flexbox and also support other browsers.






    share|improve this answer




























      0














      You can use a polyfill for the browsers that don't support flexbox. For example: https://github.com/jonathantneal/flexibility



      Modernizr has several options listed here: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#flexible-box-layout-spec



      That way you can still use flexbox and also support other browsers.






      share|improve this answer


























        0












        0








        0







        You can use a polyfill for the browsers that don't support flexbox. For example: https://github.com/jonathantneal/flexibility



        Modernizr has several options listed here: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#flexible-box-layout-spec



        That way you can still use flexbox and also support other browsers.






        share|improve this answer













        You can use a polyfill for the browsers that don't support flexbox. For example: https://github.com/jonathantneal/flexibility



        Modernizr has several options listed here: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#flexible-box-layout-spec



        That way you can still use flexbox and also support other browsers.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '18 at 9:57









        richflowrichflow

        896210




        896210

























            0














            You can achieve the same result using lot of techniques in css, i'll show you some examples:



            Using Inline-block element
            https://codepen.io/joaoskr/pen/OaEdJz



            Using Float left
            https://codepen.io/joaoskr/pen/JeZxXX



            Using table alignment
            https://codepen.io/joaoskr/pen/zMaewv



            As you can see, you have lots of possibility to achieve the same result without use flex, choose which you think better, hope it can help you !!






            share|improve this answer
























            • Thank you. I tried to use the Inline-block element. The problem is that the top and bottom padding is not working on the buttons anymore, do you have an idea about the problem? this is the code codepen.io/kev34/pen/GwGeya

              – pungis
              Nov 26 '18 at 11:01











            • @pungis Add float: left; to the #left and #right element, then add this line #wrapper:after { content: ""; display: table; clear: both; }

              – João Deroldo
              Nov 26 '18 at 11:14


















            0














            You can achieve the same result using lot of techniques in css, i'll show you some examples:



            Using Inline-block element
            https://codepen.io/joaoskr/pen/OaEdJz



            Using Float left
            https://codepen.io/joaoskr/pen/JeZxXX



            Using table alignment
            https://codepen.io/joaoskr/pen/zMaewv



            As you can see, you have lots of possibility to achieve the same result without use flex, choose which you think better, hope it can help you !!






            share|improve this answer
























            • Thank you. I tried to use the Inline-block element. The problem is that the top and bottom padding is not working on the buttons anymore, do you have an idea about the problem? this is the code codepen.io/kev34/pen/GwGeya

              – pungis
              Nov 26 '18 at 11:01











            • @pungis Add float: left; to the #left and #right element, then add this line #wrapper:after { content: ""; display: table; clear: both; }

              – João Deroldo
              Nov 26 '18 at 11:14
















            0












            0








            0







            You can achieve the same result using lot of techniques in css, i'll show you some examples:



            Using Inline-block element
            https://codepen.io/joaoskr/pen/OaEdJz



            Using Float left
            https://codepen.io/joaoskr/pen/JeZxXX



            Using table alignment
            https://codepen.io/joaoskr/pen/zMaewv



            As you can see, you have lots of possibility to achieve the same result without use flex, choose which you think better, hope it can help you !!






            share|improve this answer













            You can achieve the same result using lot of techniques in css, i'll show you some examples:



            Using Inline-block element
            https://codepen.io/joaoskr/pen/OaEdJz



            Using Float left
            https://codepen.io/joaoskr/pen/JeZxXX



            Using table alignment
            https://codepen.io/joaoskr/pen/zMaewv



            As you can see, you have lots of possibility to achieve the same result without use flex, choose which you think better, hope it can help you !!







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 26 '18 at 10:21









            João DeroldoJoão Deroldo

            38017




            38017













            • Thank you. I tried to use the Inline-block element. The problem is that the top and bottom padding is not working on the buttons anymore, do you have an idea about the problem? this is the code codepen.io/kev34/pen/GwGeya

              – pungis
              Nov 26 '18 at 11:01











            • @pungis Add float: left; to the #left and #right element, then add this line #wrapper:after { content: ""; display: table; clear: both; }

              – João Deroldo
              Nov 26 '18 at 11:14





















            • Thank you. I tried to use the Inline-block element. The problem is that the top and bottom padding is not working on the buttons anymore, do you have an idea about the problem? this is the code codepen.io/kev34/pen/GwGeya

              – pungis
              Nov 26 '18 at 11:01











            • @pungis Add float: left; to the #left and #right element, then add this line #wrapper:after { content: ""; display: table; clear: both; }

              – João Deroldo
              Nov 26 '18 at 11:14



















            Thank you. I tried to use the Inline-block element. The problem is that the top and bottom padding is not working on the buttons anymore, do you have an idea about the problem? this is the code codepen.io/kev34/pen/GwGeya

            – pungis
            Nov 26 '18 at 11:01





            Thank you. I tried to use the Inline-block element. The problem is that the top and bottom padding is not working on the buttons anymore, do you have an idea about the problem? this is the code codepen.io/kev34/pen/GwGeya

            – pungis
            Nov 26 '18 at 11:01













            @pungis Add float: left; to the #left and #right element, then add this line #wrapper:after { content: ""; display: table; clear: both; }

            – João Deroldo
            Nov 26 '18 at 11:14







            @pungis Add float: left; to the #left and #right element, then add this line #wrapper:after { content: ""; display: table; clear: both; }

            – João Deroldo
            Nov 26 '18 at 11:14













            0














            Most modern browser versions support flex, however you may want to include some browser specific rules for legacy support.



            -webkit-flex: for Chrome 21.0+/Safari 6.1+



            -ms-flex: for IE10



            -moz-flex: for Firefox 18.0+






            share|improve this answer
























            • flexbox

              – Zohir Salak
              Nov 26 '18 at 12:23
















            0














            Most modern browser versions support flex, however you may want to include some browser specific rules for legacy support.



            -webkit-flex: for Chrome 21.0+/Safari 6.1+



            -ms-flex: for IE10



            -moz-flex: for Firefox 18.0+






            share|improve this answer
























            • flexbox

              – Zohir Salak
              Nov 26 '18 at 12:23














            0












            0








            0







            Most modern browser versions support flex, however you may want to include some browser specific rules for legacy support.



            -webkit-flex: for Chrome 21.0+/Safari 6.1+



            -ms-flex: for IE10



            -moz-flex: for Firefox 18.0+






            share|improve this answer













            Most modern browser versions support flex, however you may want to include some browser specific rules for legacy support.



            -webkit-flex: for Chrome 21.0+/Safari 6.1+



            -ms-flex: for IE10



            -moz-flex: for Firefox 18.0+







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 26 '18 at 10:47









            tshimkustshimkus

            673519




            673519













            • flexbox

              – Zohir Salak
              Nov 26 '18 at 12:23



















            • flexbox

              – Zohir Salak
              Nov 26 '18 at 12:23

















            flexbox

            – Zohir Salak
            Nov 26 '18 at 12:23





            flexbox

            – Zohir Salak
            Nov 26 '18 at 12:23


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53478572%2flooking-for-an-alternative-to-flex%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

            Calculate evaluation metrics using cross_val_predict sklearn

            Insert data from modal to MySQL (multiple modal on website)