Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css word wrapping issue with margin left set

Tags:

css

I have a script that produces rows of data from a MySQL table. If the text (data) is longer than the space available, the text wraps. Thats fine, but when the text is wrapped the margin on the wrapped line is ignored.

The code:

<div class="TabelText"><?php echo $row_Audits['SeqText'];?></div>

.TabelText {
   font-family: Tahoma, Geneva, sans-serif;
   font-size: 12px;
   color: #950000;
   margin-left: 10px;
}

The result:

   0401 Bathroom Door & Frame (Inside 
and Outside) 

Is there a way to produce a result like:

0401 Bathroom Door & Frame (Inside 
and Outside) 

Many thanks in advance for your time.

like image 537
DCJones Avatar asked Apr 09 '26 04:04

DCJones


1 Answers

Use this display: inline-block;

.TabelText {
   font-family: Tahoma, Geneva, sans-serif;
   font-size: 12px;
   color: #950000;
   margin-left: 10px;
   display: inline-block
 }
like image 167
aaqib90 Avatar answered Apr 11 '26 17:04

aaqib90



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!