justAnoob Posted November 13, 2009 Share Posted November 13, 2009 my span class wont take affect when this line is echoed out. Anyone? <?php echo ' <span class="style9"><a href="#" onclick="clicked(\'' . $row['item_name'] . '\')">' . $row['item_name'] . '</a></span>'; ?> Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/ Share on other sites More sharing options...
justAnoob Posted November 14, 2009 Author Share Posted November 14, 2009 Basically, this is what I have, the 3 echoed lines, the last 2 columns work just fine in my table. But the 1st column, the CSS style won't apply to my text ( $row['item_name'] ) Is this something minor? .style10 { color: #000000; font-weight: bold; text-decoration: none; } <?php echo '<td width="388"><span class="style10"><a href="#" onclick="clicked(\'' . $row ['item_name'] . '\')">' . $row['item_name'] . '</a></span></td> '; echo '<td width="110"><div align="center" class="style10">55</div></td>'; echo '<td width="131"><div align="center" class="style10">07-19-2009</div></td>'; ?> Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957194 Share on other sites More sharing options...
trq Posted November 14, 2009 Share Posted November 14, 2009 This is a css or html issue. Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957202 Share on other sites More sharing options...
mstne Posted November 14, 2009 Share Posted November 14, 2009 it looks like you have issues with your ' and " , not the code. consistency is key, and you have to be perfect. Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957207 Share on other sites More sharing options...
trq Posted November 14, 2009 Share Posted November 14, 2009 it looks like you have issues with your ' and " , not the code. consistency is key, and you have to be perfect. There is nothing wrong with the php. Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957208 Share on other sites More sharing options...
justAnoob Posted November 14, 2009 Author Share Posted November 14, 2009 knowing that the php is good is a start, i guess i will post this in a different section. but which one. let me know what is wrong so i can put this somewhere else, thanks. Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957212 Share on other sites More sharing options...
trq Posted November 14, 2009 Share Posted November 14, 2009 Report the post and have it moved, its against the rules to post the same question in multiple locations. Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957213 Share on other sites More sharing options...
iarp Posted November 14, 2009 Share Posted November 14, 2009 Eithor change: .style10 { to .style10 a { or move the class="style10" to the <a> itself and not the span. Although if you really need the span for some odd reason, then just do the .style10 a { Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957216 Share on other sites More sharing options...
justAnoob Posted November 14, 2009 Author Share Posted November 14, 2009 thanks, i will give it a shot. Link to comment https://forums.phpfreaks.com/topic/181441-solved-problem-with-class/#findComment-957219 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.