user2217381
user2217381

Reputation: 21

PHP output styling

I have this php output

<?=($event ['Field'])?>: 

<?=($event['Value'])?>  

If i surround it with a div the line seams to break making these two outputs apear on separate lines on the doc.

How would I make the field bold without effecting the positioning of the value?

Upvotes: 0

Views: 50

Answers (2)

Ivan Yonkov
Ivan Yonkov

Reputation: 7034

Or either define classes for these divs, so make them in CSS To float on the same row

Upvotes: 0

Eric
Eric

Reputation: 97571

Use a span (along with the relevant CSS):

<span class="field-name"><?= $event['Field'] ?></span>:
<?= $event['Value'] ?> 

divs have an implicit display: block, which prevents them flowing with text.

Upvotes: 1

Related Questions