

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How we can put three divisions <div> side by side in HTML?
With CSS properties, you can easily put three <div> side by side in HTML. Use the CSS property float to achieve this.
With that, add height:100px and set margin.
Example
You can try to run the following code to place three <div> side by side.
<!DOCTYPE html> <html> <head> <title>HTML div</title> </head> <body> <div style="width: 100px; float:left; height:100px; background:gray; margin:10px"> First DIV </div> <div style="width: 100px; float:left; height:100px; background:yellow; margin:10px"> Second DIV </div> <div style="width: 100px; float:left; height:100px; background:red; margin:10px"> Third DIV </div> </body> </html>
- Related Questions & Answers
- How we can put two divisions <div> side by side in HTML?
- How to align images side by side with CSS?
- How to create side-by-side boxplot in base R?
- How to create side by side histograms in base R?
- How to create side by side barplot in base R?
- How to make two plots side-by-side using Python?
- How to plot two Seaborn lmplots side-by-side (Matplotlib)?
- How to plot two histograms side by side using Matplotlib?
- How to horizontally center a <div> in another <div>?
- How do we style HTML elements using the division tag <div>?
- How to use the <script> tag to define client-side JavaScript?
- Display <div> or <span> over image on :hover in HTML
- How can we get “MySQL server-side help”?
- What is the difference between HTML tags <div> and <span>?
- How to plot bar graphs with same X coordinates side by side in Matplotlib?
Advertisements