[英]PHP output styling
I have this php output 我有这个PHP输出
<?=($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. 如果我用div包围它,则线缝会折断,使这两个输出出现在文档的单独行上。
How would I make the field bold without effecting the positioning of the value? 在不影响值定位的情况下,如何使字段变粗体?
Use a span (along with the relevant CSS): 使用跨度(以及相关的CSS):
<span class="field-name"><?= $event['Field'] ?></span>:
<?= $event['Value'] ?>
div
s have an implicit display: block
, which prevents them flowing with text. div
具有隐式display: block
,可防止它们与文本一起流动。
或者为这些div定义类,因此使它们在CSS中浮动在同一行上
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.