本文共 801 字,大约阅读时间需要 2 分钟。
我想要找出的是适用的语法,在我的表格中的每个单独的td应用一些风格:
When | Where | Start | Finish |
---|
// some PHP to fetch all the gig entries from the shows table
$shows_query = "SELECT * FROM shows ORDER BY date ASC";
$shows = mysql_query($shows_query);
// a loop to place all the values in the appropriate table cells
while ($show = mysql_fetch_array($shows)){
//begin the loop...
?>
<?php$date = date("l, F j, Y", strtotime($show['date']));
echo "$date";
?>
<?phpecho $show['venue'];
?>
<?php$time = date("G:i", strtotime($show['time']));
echo "$time";
?>
<?php$until = date("G:i", strtotime($show['until']));
echo "$until";
?>
// close the loop:
}
?>
我现在的样式是:
#shows table.gig { font-size: 25px; }
#shows td.finish { margin-left: 50px;}
我确实有一个表的本身,但不知道是否有必要.
字体大小的工作,但我无法想像的是如何将样式应用到td,th,tr元素等.我已经尝试了几件事,但似乎无法让它工作!
任何帮助非常感谢.
谢谢.
转载地址:http://zorml.baihongyu.com/