Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Place two paragraphs next to each other?

I've been experimenting with paragraphs and writing to them from the script tag and was wondering if there is a way to place them next to each other horizontally rather than underneath. My current code is like this:

<p id="csvData"></p>
<p id="csvData2"></p> 

I can't work out how to get "csvData" and "csvData2" to go to next to each other.

like image 496
LegitBritish Avatar asked Oct 17 '25 18:10

LegitBritish


1 Answers

It isn't a script thing, this would easily be done via CSS.

#csvData {
  border: 1px solid red;
  height: 200px;
  float: left;
  width: 45%;
}
#csvData2 {
  border: 1px dotted blue;
  height: 400px;
  float: right;
  width: 45%;
}
<p id="csvData"></p>
<p id="csvData2"></p> 
like image 166
Snowmonkey Avatar answered Oct 20 '25 07:10

Snowmonkey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!