Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
div { display: inline; }
div.container {
clear: left;
background: silver;
border: solid black 1px;
padding: 2px;
}
div.element {
float: left;
margin: 0 3px;
border-right: solid black 1px;
}
div.element:hover {
background: whitesmoke;
}
<div class="container">
<div class="element">Q1</div>
<div class="element">Q2</div>
</div>
Or you can use the clearfix trick. But if you give up with the [tt]div[/tt]s, is more simple :Bryan said:So I have to add the " " at the end?
div.container {
background: silver;
border: solid black 1px;
padding: 2px;
}
span.element {
margin: 0 2px;
border-right: solid black 1px;
}
span.element:hover {
background: whitesmoke;
}
<div class="container">
<span class="element">Q1</span>
<span class="element">Q2</span>
</div>