Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to design a group of object

enter image description here

I want to make a group of buttons or spans that always fit in 6 places of screen (sorry I draw it not really straight). Thanks for your helping first.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

.row__main{
    max-width:280px;
    margin:0 auto;
    content:"";
    display: block;
    clear:both;
    height:110px;
    padding:0 15px 0 15px;
    border: 1px solid black;
}

[class^="col-"]{
    float:left;

}
[class^="col-"]:not(:last-child){
    margin-right: 60px;
}

.col-1-of-3{
    margin-top:23px;
    width:calc((100% - 2*#{60px})/3);

}
<div class="row__main">
<div class="row-1">
    <div class="col-1-of-3"><button>button</button></div>
    <div class="col-1-of-3"><button>button</button></div>
    <div class="col-1-of-3"><button>button</button></div>
</div>
<div class="row-1">
    <div class="col-1-of-3"><button>button</button></div>
    <div class="col-1-of-3"><button>button</button></div>
    <div class="col-1-of-3"><button>button</button></div>
</div>
</div>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading