Answers for "how to put two divs next to each other css"

CSS
1

multiple divs next to each other

.container {
  display: flex;
}

.item {
  background: #ce8888;
  flex-basis: 100px;
  height: 100px;
  margin: 5px;
}
Posted by: Guest on September-17-2021
0

css put div next to each other

#wrapper {
    width: 500px;
    border: 1px solid black;
    overflow: hidden; /* will contain if #first is longer than #second */
}
#first {
    width: 300px;
    float:left; /* add this */
    border: 1px solid red;
}
#second {
    border: 1px solid green;
    overflow: hidden; /* if you don't want #second to wrap below #first */
}
Posted by: Guest on November-25-2021

Code answers related to "how to put two divs next to each other css"

Browse Popular Code Answers by Language