Elements <p>
are block by default (user agent style uses display: block;
), then just exchange for or other element that is inline
, as <span>
, something like:
<div class="back">
<span class="p3">10</span>
<span class="p3">20</span>
<span class="p3">30</span>
<span class="p3">40</span>
<span class="p3">50</span>
<span class="p3">60</span>
<span class="p3">70</span>
<span class="p3">80</span>
<span class="p3">90</span>
<span class="p3">100</span>
<span class="p3">110</span>
<span class="p3">120</span>
<span class="p3">130</span>
</div>
Note that if the elements reach the limit width of the parent element or view-port (or body, it depends on how you set it) you could use white-space: nowrap;
, example:
.back {
white-space: nowrap;
}
<div class="back">
<span class="p3">10</span>
<span class="p3">20</span>
<span class="p3">30</span>
<span class="p3">40</span>
<span class="p3">50</span>
<span class="p3">60</span>
<span class="p3">70</span>
<span class="p3">80</span>
<span class="p3">90</span>
<span class="p3">100</span>
<span class="p3">110</span>
<span class="p3">120</span>
<span class="p3">130</span>
<span class="p3">10</span>
<span class="p3">20</span>
<span class="p3">30</span>
<span class="p3">40</span>
<span class="p3">50</span>
<span class="p3">60</span>
<span class="p3">70</span>
<span class="p3">80</span>
<span class="p3">90</span>
<span class="p3">100</span>
<span class="p3">110</span>
<span class="p3">120</span>
<span class="p3">130</span>
<span class="p3">10</span>
<span class="p3">20</span>
<span class="p3">30</span>
<span class="p3">40</span>
<span class="p3">50</span>
<span class="p3">60</span>
<span class="p3">70</span>
<span class="p3">80</span>
<span class="p3">90</span>
<span class="p3">100</span>
<span class="p3">110</span>
<span class="p3">120</span>
<span class="p3">130</span>
</div>
Cool, I didn’t know that, thanks
– Jeff Henrique
I still can’t accept the answer, but when they release I accept
– Jeff Henrique
@Jeffhenrique test before calmly, there is no deadline to accept the answer, can accept it when you are confident that solved your problem, if you have not solved just comment here.
– Guilherme Nascimento
Okay, but I tested it and it worked as wanted, thank you
– Jeff Henrique