Search
 
SCRIPT & CODE EXAMPLE
 

CSS

how to make width equal to height css

.box {
    position: relative;
    width:    50%; /* desired width */
}

.box:before {
    content:     "";
    display:     block;
    padding-top: 100%; /* initial ratio of 1:1*/
}

.content {
    position: absolute;
    top:      0;
    left:     0;
    bottom:   0;
    right:    0;
}

/* Other ratios - just apply the desired class to the "box" element */
.ratio2_1:before{
    padding-top: 50%;
}
.ratio1_2:before{
    padding-top: 200%;
}
.ratio4_3:before{
    padding-top: 75%;
}
.ratio16_9:before{
    padding-top: 56.25%;
}
Comment

equal width css

// equal width css
.parent {
  display: flex;
}

.child {
  flex: 1;
}

// your welcome
Comment

PREVIOUS NEXT
Code Example
Css :: sass loader 
Css :: css flex add second row 
Css :: css class and id selector 
Css :: css line-height default 
Css :: npm ERR! 404 Not Found - GET https://registry.npmjs.org/taiwindcss - Not found 
Css :: centrizing a table with css 
Css :: css border without changing size 
Css :: nav bar without display:flex 
Css :: color code for maroon 
Css :: input css for disabled state 
Css :: set css on parent element css 
Css :: responsive table style 
Css :: how fixed image at top 
Css :: animated progress bar css 
Css :: translate css property 
Css :: *{ margin: 0; padding: 0; box-sizing: border-box; } 
Css :: css 2 divs nebeneinander 
Css :: li move to left 
Css :: how to make a html css js editor 
Css :: tailwind css next 
Css :: css make hover on parent child move 
Css :: border style shorthand 
Css :: dot in image css 
Css :: add space inbetween words of text 
Css :: memebuat html dan css login instagram 
Css :: css hide select label 
Css :: calling synchronous methods on native modules is not supported in chrome 
Css :: map arrays 
Css :: flexbox in css 
Css :: bootstrap container 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =