I'm having a bit of difficulty creating a rectangle that looks like this. I'm a novice, any help would be great!
This is what I'm trying to recreate:
I know how to make the rectangle, and I'm assuming you would split the rectangle into two sections, where one would use "table" to create the rows for Name, Diagnosis etc.
#box {
margin-top: 1%;
height: 20px;
width: 562px;
border: 1px solid black;
padding: 100px;
}
.container {
display: table;
width: 100%;
}
.left-half {
position: relative;
left: 0px;
}
.right-half {
position: relative;
right: 0px;
}
Solution
Flex grid <3 they are amazing
I have provided you three examples. Rows, columns and an additional example to show more properties of the flex box.
justify-content and align-items are amazing tools to align things quickly.
Example:
/*ExamplE box*/
.example {
float: left;
width: 200px;
height: 100px;
border: 1px solid black;
display: flex;
flex-direction: row; /*Direction of flex*/
justify-content:center; /*horizontally aligns them to center*/
align-items: center; /*Vertically aligns them to center*/
}
.example__children {
width: 5px;
height: 5px;
margin: 0 5px;
border: 1px solid black;
}
/*Column box*/
.column {
float: left;
width: 200px;
height: 100px;
border: 1px solid black;
display: flex;
flex-direction: column;
}
.column__children {
width: 100%;
height: 25%;
border: 1px solid black;
}
/*Row box*/
.row {
float: left;
width: 200px;
height: 100px;
border: 1px solid black;
display: flex;
flex-direction: row;
}
.row__children {
width: 25%;
height: 100%;
border: 1px solid black;
}
<div class="example">
<div class="example__children"></div>
<div class="example__children"></div>
<div class="example__children"></div>
<div class="example__children"></div>
</div>
<div class="column">
<div class="column__children"></div>
<div class="column__children"></div>
<div class="column__children"></div>
<div class="column__children"></div>
</div>
<div class="row">
<div class="row__children"></div>
<div class="row__children"></div>
<div class="row__children"></div>
<div class="row__children"></div>
</div>
Related
How do I achieve a responsive layout in my code?
I have four divs with different heights. The layout for the smaller screen is as expected.
For the larger screen, I want to float the second (blue) and forth (brown) divs to the left and the first (red) and third (green) divs to the right, as shown in the image.
Here is my code:
CSS
.wrapper {
border: 2px solid;
padding: 10px;
min-height: 300px;
}
.first-div {
border: 2px solid red;
height: 80px;
margin-bottom: 10px;
}
.second-div {
border: 2px solid blue;
height: 200px;
margin-bottom: 10px;
}
.third-div {
border: 2px solid green;
height: 180px;
margin-bottom: 10px;
}
.forth-div {
border: 2px solid brown;
height: 100px;
}
#media (min-width: 892px) {
.first-div {
float: right;
width: 500px;
}
.second-div {
float: left;
width: 280px;
}
.third-div {
clear: both;
float: right;
width: 500px;
}
.forth-div {
clear: both;
float: left;
width: 280px;
}
}
h4 {
text-align: center;
}
.clear-both {
clear: both;
}
HTML
<div class="wrapper">
<div class="first-div"><h4>First Div</h4></div>
<div class="second-div"><h4>Second Div</h4></div>
<div class="third-div"><h4>Third Div</h4></div>
<div class="forth-div"><h4>Forth Div</h4></div>
<div class="clear-both"></div>
</div>
You just need to make a few changes in your code. Firstly, you need to change the order of your DIV's (what DIV comes first, which one comes after that etc).
Secondly, you need to remove few of the float and clear properties from your CSS. I have attached a runnable code snippet below, with a few changes in your code: (just be sure to view the results in "full page" view, or else it would show the results of smaller screens).
.wrapper {
border: 2px solid;
padding: 10px;
min-height: 300px;
}
.first-div {
border: 2px solid red;
height: 80px;
margin-bottom: 10px;
}
.second-div {
border: 2px solid blue;
height: 200px;
margin-bottom: 10px;
}
.third-div {
border: 2px solid green;
height: 180px;
margin-bottom: 10px;
}
.forth-div {
border: 2px solid brown;
height: 100px;
}
#media (min-width: 892px) {
.first-div {
float: right;
width: 500px;
clear: right;
}
.second-div {
width: 280px;
clear: left;
}
.third-div {
clear: right;
float: right;
width: 500px;
}
.forth-div {
float: left;
width: 280px;
clear: left;
}
}
h4 {
text-align: center;
}
.clear-both {
clear: both;
}
<!DOCTYPE html>
<html>
<body>
<div class="wrapper">
<div class="first-div">
<h4>First Div</h4>
</div>
<div class="third-div">
<h4>Third Div</h4>
</div>
<div class="second-div">
<h4>Second Div</h4>
</div>
<div class="forth-div">
<h4>Forth Div</h4>
</div>
<div class="clear-both"></div>
</div>
</body>
</html>
I advise the solution to flex. I arranged the blocks as you need on the desktop version. Also, I removed <div class="clear-both"></div>. Because it is enough to make the free space by specifying the width: 90%. At a screen width of 892px, a media query is triggered.
Blocks become responsive!
Hope you like it.
.wrapper {
border: 2px solid;
padding: 10px;
min-height: 300px;
}
.container {
display: flex;
flex-flow: wrap;
flex-direction: column;
gap: 10px;
width: 90%;
height: 300px;
}
.container div {
box-sizing: border-box;
width: calc((100% / 2) - (10px / 2));
flex: 1 0 auto;
}
.first-div {
border: 2px solid red;
height: 80px;
order: 3;
}
.second-div {
border: 2px solid blue;
height: 200px;
order: 1;
}
.third-div {
border: 2px solid green;
height: 180px;
order: 4;
}
.forth-div {
border: 2px solid brown;
height: 80px;
order: 2;
}
h4 {
text-align: center;
}
#media (max-width: 892px) {
.container {
width: 100%;
height: auto;
}
.container div {
width: 100%;
order: unset;
}
}
<div class="wrapper">
<div class="container">
<div class="first-div"><h4>First Div</h4></div>
<div class="second-div"><h4>Second Div</h4></div>
<div class="third-div"><h4>Third Div</h4></div>
<div class="forth-div"><h4>Forth Div</h4></div>
</div>
</div>
Here is the fixed version, I hope this is what you wanted. I altered your html a bit, as you can see, css as well, but it's pretty clear what is going on in my code, if you have any questions, ask away !
Just a tip :
Dont use float property, it's very bad and deprecated, use flex or css grid for responsive design ! :)
.wrapper {
border: 2px solid;
padding: 10px;
min-height: 300px;
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.secondForth{
width : 40%;
}
.firstThird{
width : 40%;
}
.allFour{
display: none;
}
.first-div {
border: 2px solid red;
height: 80px;
margin-bottom: 10px;
}
.second-div {
border: 2px solid blue;
height: 200px;
margin-bottom: 10px;
}
.third-div {
border: 2px solid green;
height: 180px;
margin-bottom: 10px;
}
.forth-div {
border: 2px solid brown;
height: 100px;
}
#media (max-width: 892px) {
.secondForth, .firstThird{
display: none;
}
.allFour{
display: block;
width: 100%;
}
}
h4 {
text-align: center;
}
<div class="wrapper">
<div class="secondForth">
<div class="second-div"><h4>Second Div</h4></div>
<div class="forth-div"><h4>Forth Div</h4></div>
</div>
<div class="allFour">
<div class="first-div"><h4>First Div</h4></div>
<div class="second-div"><h4>Second Div</h4></div>
<div class="third-div"><h4>Third Div</h4></div>
<div class="forth-div"><h4>Forth Div</h4></div>
</div>
<div class="firstThird">
<div class="first-div"><h4>First Div</h4></div>
<div class="third-div"><h4>Third Div</h4></div>
</div>
</div>
I'm looking to align three divs side by side without any flexbox and grid.
This is the style that I'm looking for: Image
This is what I'm currently getting: Image
.container {
width: 600px;
border: 1px solid black;
}
.box-1 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
.box-2 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
.box-3 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
<div class="container">
<div class="box-1"></div>
<div class="box-2"></div>
<div class="box-3"></div>
</div>
Note: Just asking about alignment, not the border, background etc
Edit: The parent container has width 600px. It cannot be changed. And the children have 180px width and 100px height, and margin of 10px.
You can resolve it using display: flex; layout on .container class.
The default direction of flex layout is row (flex-direction: row).
.container {
width: 600px;
border: 1px solid black;
display: flex;
}
.box-1 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
.box-2 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
.box-3 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
<div class="container">
<div class="box-1"></div>
<div class="box-2"></div>
<div class="box-3"></div>
</div>
Hey increase the width of the container as follow:
.container {
width: 1000px;
border: 1px solid black;
}
.box-1 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
.box-2 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
.box-3 {
width: 180px;
height: 100px;
background: grey;
margin: 10px;
display: inline-block;
}
<div class="container">
<div class="box-1"></div>
<div class="box-2"></div>
<div class="box-3"></div>
</div>
or use display : flex in your container both will help....
If you dont want to use Flexbox, You can simply try increasing the width such that all 3 divs are aligned in a single line
like Aahad said...
I want to learn how to build a textbox that is an auto-expanding sort of search box like you see on Google:
Desired Result
Before
After
High-Level Design
In this design below, I demonstrate that I want it to visually seem as if the textbox itself is expanding. The way I see it, there is an input box for the text, but the height of the underlying searchbox-container is auto expanding on the y-axis.
Attempt
nav {
font-family: "Inter", sans-serif;
display: flex;
border-bottom: 1px solid #b1aeae;
background-color: #f7f7f7;
height: 60px;
width: 100%;
}
.nav-container {
max-width: 925px;
width: 80%;
height: auto;
margin: 0 auto;
}
.search-container {
width: 50%;
display: flex;
align-items: center;
flex-direction: column;
position: relative;
}
.search-box {
border: 1px solid #b7b5b5;
height: 30px;
width: 100%;
background-color: white;
border-radius: 50px;
margin-top: 20px;
display: flex;
align-items: center;
}
.search-icon {
padding-left: 15px;
}
.search-box input[type="text"] {
border: none;
margin-left: 20px;
font-family: "Inter";
width: 70%;
}
.search-box input[type="text"]:focus {
outline-width: 0;
}
.search-results {
display: flex;
flex-direction: column;
width: 98%;
height: auto;
border-radius: 0px;
border-color: #b7b5b5;
border-style: solid;
background-color: white;
border-width: 0px 1px 1px 1px;
border-radius: 0px 0px 20px 20px;
-webkit-box-shadow: 10px 13px 0px 0px rgba(0, 0, 0, 0.07);
-moz-box-shadow: 10px 13px 0px 0px rgba(0, 0, 0, 0.07);
box-shadow: 10px 13px 0px 0px rgba(0, 0, 0, 0.07);
}
.search-result:last-child {
border-bottom: none;
}
.search-result:hover:last-child {
border-bottom: none;
border-radius: 0px 0px 20px 20px;
}
.search-result {
width: 100%;
border-bottom: 1px solid #b7b5b5;
padding-left: 20px;
padding-top: 10px;
padding-bottom: 10px;
}
.search-result:hover {
background-color: #f7f7f7;
}
.links-container {
width: 55%;
height: 100%;
}
<nav>
<div class="nav-container">
<div class="search-container">
<div class="search-box">
<ion-icon name="search-outline" class="search-icon"></ion-icon>
<input type="text" placeholder="Search articles & videos here" />
</div>
<div class="search-results">
<div class="search-result">Result 1</div>
<div class="search-result">Result 2</div>
<div class="search-result">Result 3</div>
</div>
</div>
<div class="links-container"></div>
</div>
</nav>
Current Outcome:
Clearly this is not looking good. I'm new to Flexbox so having some difficulty structuring this to achieve the previously mentioned goal.
This had a lot of stuff that needed to change, so I pretty much rewrote it. Hopefully, I've given you some ideas to build on.
Some points:
display: flex should only be set on a flex container, not on the cell elements.
Use flex-basis if you need to set the width of a flex cell (don't use width).
Don't use margins. Use flex-gap to space out your cells.
Don't set the height unless you have to. Let the flex display try to set it for you first. In this example, we have to set the height of the link elements to keep them from being the same height as the search elements. (Short of using a grid, there's no way around that that I can see.)
Prefer padding to size your elements. (Very much prefer it over height.)
If you want something with two dimensions, don't use flex at all. Use grid. A vertical flex within a horizontal flex is beginning to push the envelope for what flex is intended for (a one-dimensional arrangement of a set of related elements); you could just as well set this up as a grid with blank areas beneath the menu.
As for dynamically resizing the container div, you don't have to do anything special. If you programmatically add elements to the container, flex will take care of resizing it.
Here's some code:
* {
box-sizing: border-box;
}
nav {
min-width: 800px;
padding: 20px;
background-color: #f7f7f7;
width: 100%;
justify-content: center;
display: flex;
column-gap: 40px;
}
a {
text-decoration: none;
padding: 20px;
}
.search-container {
border: 2px solid darkgrey;
border-radius: 20px;
flex-basis: 40%;
display: flex;
flex-direction: column;
justify-content: center;
column-gap: 20px;
z-index: 1;
}
.search-container a, .search-container p {
border-bottom: 1px solid #b7b5b5;
background-color: white;
text-align: center;
}
.search-container p {
margin: 0;
padding: 30px 20px;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
.search-container a:last-child {
border: none;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
.links-container {
display: flex;
padding: 10px 0;
flex-basis: 40%;
z-index: 1;
}
.links-container a {
height: 60px;
padding: 20px 40px;
background-color: blue;
color: white;
}
.links-container a:hover {
background-color: green;
}
.header-overlay {
width: 100%;
min-width: 800px;
height: 120px;
background-color: lightgrey;
position: absolute;
}
<body>
<header>
<div class="header-overlay"></div>
<nav>
<div class="search-container">
<p>Search Results</p>
Result 1
Result 2
Result 3
Result 4
Result 5
</div>
<div class="links-container">
One
Two
Three
</div>
</nav>
</header>
</body>
As you can see, this code (especially the HTML) is simpler than yours. Basically, a flex is a container (with display: flex set) and a single set of nested elements. Any of those elements can be a container for another flex. That's what we have here: the nav is a flex with two elements, and each of those elements (search and links) is a flex container as well. A few observations:
Using box-sizing: border-box everywhere will make your life a lot easier. You probably have had the experience of setting up two divs, setting their width to 50%, and being mystified that they won't fit on one line. It's because by default, padding and borders get added onto the outside of the div at the specified width, so its width becomes more than 50%. What this setting does is put padding and borders inside the width instead of outside it.
Notice how to set border-radius for only some of the corners using border-top-left-radius, etc.
Your design appears to want to have your search results drop below the header. This is a bit difficult to do with any setting for the search results themselves. The easier way to do it is to simply "fake" it overlaying a div at the top. You'll see that I've set div.header-overlay to position: absolute. That positions it at the top of the screen. Then, setting the z-index to 1 for both the search and links elements brings them above the header overlay.
When you run the code here, the links take up more than 40% of the horizontal space; that's because the padding I used make it do that. I set the min-width to 800px so it wouldn't look too squashed, but that causes horizontal scrolling here, which isn't the best for an actual page. So, you'll want to play with flex-grow and flex-shrink, as well as media queries and different layouts for different screens, to make the layout more responsive.
That should give you some missing pieces for building flex displays. You can tinker with the markup and settings and learn more.
Hope this works for you!
nav {
display: flex;
border-bottom: 1px solid #b1aeae;
background-color: #f7f7f7;
height: 60px;
width: 100%;
}
.nav-container {
display: flex;
max-width: 925px;
width: 80%;
height: auto;
margin: 0 auto;
}
.search-container {
width: 50%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: relative;
}
.search-box {
border: 1px solid #b7b5b5;
position: absolute;
height: 30px;
width: 100%;
background-color: white;
border-radius: 50px;
padding-left: 20px;
display: flex;
flex-direction: column;
}
.search-results {
width: 90%;
display: flex;
height: 200px;
border-radius: 0px;
border-color: #b7b5b5;
border-style: solid;
background-color: white;
border-width: 0px 1px 1px 1px;
}
.search-result {
width: 100%;
border-bottom: 1px solid blue;
height: 20px;
}
.links-container {
width: 55%;
height: 100%;
}
nav {
display: flex;
border-bottom: 1px solid #b1aeae;
background-color: #f7f7f7;
height: 60px;
width: 100%;
}
.nav-container {
display: flex;
max-width: 925px;
width: 80%;
height: auto;
margin: 0 auto;
}
.search-container {
width: 50%;
display: flex;
justify-content: center;
align-items: top;
flex-direction: row;
position: relative;
}
.search-box {
border: 1px solid #b7b5b5;
position: absolute;
height: 30px;
width: 100%;
background-color: white;
border-radius: 50px;
padding-left: 20px;
display: flex;
flex-direction: column;
}
.search-results {
width: 90%;
display: flex;
flex-direction:column;
align-items: center;
height: 200px;
border-radius: 0px;
border-color: #b7b5b5;
border-style: solid;
background-color: white;
border-width: 0px 1px 1px 1px;
}
.search-result {
position:relative;
text-align:center;
top: 40px;
width: 100%;
border-bottom: 1px solid blue;
height: 20px;
z-index: 9999;
}
.links-container {
width: 55%;
height: 100%;
}
<nav>
<div class="nav-container">
<div class="search-container">
<div class="search-box"></div>
<div class="search-results">
<div class="search-result">Result 1</div>
<div class="search-result">Result 2</div>
<div class="search-result">Result 3</div>
<div class="search-result">Result 4</div>
<div class="search-result">Result 5</div>
</div>
</div>
<div class="links-container"></div>
</div>
</nav>
Add this to align center of div
.search-container {
align-items: top;
flex-direction: row;
}
instead of
.search-container {
align-items: center;
flex-direction: column;
}
And add
.search-results {align-items: center;} to align center
then add to search-result,
.search-result {
position:relative;
text-align:center;
top: 40px;
z-index: 9999;
}
For search result add js
function myFunction() {
var input, filter, ul, li, a, i, txtValue;
input = document.getElementById("search-box");
filter = input.value.toUpperCase();
ul = document.getElementById("search-results");
li = ul.getElementsByTagName("div");
for (i = 0; i < li.length; i++) {
a = li[i];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
Working demo
function searching(input) {
input.classList.add("active");
var input, filter, ul, li, a, i, txtValue;
filter = input.value.toUpperCase();
ul = document.getElementById("search-results");
li = ul.getElementsByTagName("div");
for (i = 0; i < li.length; i++) {
a = li[i];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
function fun(obj){
obj.classList.add("active");
}
nav {
display: flex;
border-bottom: 1px solid #b1aeae;
background-color: #f7f7f7;
height: 60px;
width: 100%;
}
.nav-container {
display: flex;
max-width: 925px;
width: 80%;
height: auto;
margin: 0 auto;
}
.search-container {
width: 50%;
display: flex;
justify-content: center;
align-items: top;
flex-direction: row;
position: relative;
}
.search-box {
border: 1px solid #b7b5b5;
position: absolute;
height: 30px;
width: 100%;
background-color: white;
border-radius: 50px;
padding:0 30px;
display: flex;
top:18px;
flex-direction: column;
}
.search-box.active{
border:none;
border-bottom:1px solid #b7b5b5;
border-radius:0px;
background:transparent;
}
.search-box.active ~ .search-results{
visibility:visible;
}
.search-results {
width: 100%;
display: flex;
flex-direction:column;
align-items: center;
height: 180px;
background:#fff;
border-radius: 30px;
border: 1px solid #b7b5b5;
visibility:hidden;
margin-top:15px;
}
.search-result {
position:relative;
text-align:center;
top: 40px;
width: 100%;
border-bottom: 1px solid #ccc;
height: 20px;
z-index: 9999;
}
.links-container {
width: 55%;
height: 100%;
}
<nav>
<div class="nav-container">
<div class="search-container">
<input class="search-box" id="search-box" type="search" onkeyup="searching(this)" onfocus="fun(this)" placeholder="Please search fruits..">
<div class="search-results" id="search-results">
<div class="search-result">Apple</div>
<div class="search-result">Mango</div>
<div class="search-result">Orange</div>
<div class="search-result">Grape</div>
<div class="search-result">Watermelon</div>
</div>
</div>
<div class="links-container"></div>
</div>
</nav>
I have a small div with fixed width and height, inside i have text, that could be probably wrapped and icon
All i need is to keep icon as close as possible to text, but if text is wrapped it will have extra space inside it
Example at JsFiddle
HTML
<div class="wrapper">
<div class="title">
Total elements
</div>
<div class="icon"></div>
</div>
Css
wrapper {
display: flex;
align-items: center;
justify-content: flex-start;
height: 50px;
width: 100px;
}
.title {
border: 1px solid green;
}
.icon {
border: 1px solid red;
width: 8px;
height: 8px;
}
You can use CSS Grid system:
.wrapper {
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 0em;
height: 50px;
width: 100px;
}
SOLUTION 1:
Well. To answer your question, you can straight ahead apply width to the .title.
.wrapper {
display: flex;
align-items: center;
justify-content: flex-start;
height: 50px;
width: 100px;
}
.title {
border: 1px solid green;
width: 58px;
}
.icon {
border: 1px solid red;
width: 8px;
height: 8px;
}
<div class="wrapper">
<div class="title">
Total elements
</div>
<div class="icon"></div>
</div>
SOLUTION 2:
But I would suggest that you use float instead of flex model with the below solution
.wrapper {
height: 50px;
font-size: 0px;
}
.title {
border: 1px solid green;
height: 50px;
line-height: 50px;
}
.icon {
border: 1px solid red;
width: 8px;
height: 8px;
}
.title, .icon {
display: inline-block;
vertical-align: middle;
font-size: 16px;
}
<div class="wrapper">
<div class="title">
Total elements
</div>
<div class="icon"></div>
</div>
<div class="wrapper">
<div class="title">
Total elements
</div>
<div class="icon"></div>
</div>
<style type="text/css">
.wrapper
{
}
.title {
border: 1px solid green;
display: inline-block;
max-width: 60px;
vertical-align: middle;
}
.icon
{
border: 1px solid red;
width: 8px;
height: 8px;
display: inline-block;
}
</style>
How can I position divs with different heights to the bottom of parent div, next to eachother.
like I do in the code but alignment to the bottom.
the divs represent tabs, where the red on is the current active tab and the grey ones non active tabs
.pane{
position: relative;
display: block;
width: 500px;
height: 120px;
background-color: lightgrey;
}
.sec{
position: absolute;
bottom: 0px;
display: inline-block;
width: 35%;
height: 80%;
background-color: red;
border-right: dashed;
}
.thir{
float: left;
width: 15%;
height: 70%;
display: inline-block;
background-color: grey;
border-right: dashed;
}
<div class="pane">
<div class="sec"></div>
<div class="thir"></div>
<div class="thir"></div>
<div class="thir"></div>
</div>
It can be achieved using a flex box and aligning the items to the flex-end.
.pane{
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-end;
width: 500px;
height: 120px;
background-color: lightgrey;
}
.sec{
display: inline-block;
width: 35%;
height: 80%;
background-color: red;
border-right: dashed;
}
.thir{
float: left;
width: 15%;
height: 70%;
display: inline-block;
background-color: grey;
border-right: dashed;
}
<div class="pane">
<div class="sec"></div>
<div class="thir"></div>
<div class="thir"></div>
<div class="thir"></div>
</div>