j05hr Posted December 8, 2009 Share Posted December 8, 2009 I've got these links that in html you very simply just add class="blabla" in your link. I'm trying it in my PHP link and it doesn't seem to be working, is this correct for where to put the class? $content .= '<a class="pageNumber" href="buying.php?pg=' . $i . '">' . $i . '</a>' . " "; } else { $content .= '<a class="pageNumber" href="buying.php?pg=' . $i . '">' . $i . '</a>' . " "; Link to comment https://forums.phpfreaks.com/topic/184369-using-a-class-in-a-link/ Share on other sites More sharing options...
trq Posted December 8, 2009 Share Posted December 8, 2009 PHP simply outputs html, check your html source to see if there is any issue. Looks fine from here. Link to comment https://forums.phpfreaks.com/topic/184369-using-a-class-in-a-link/#findComment-973300 Share on other sites More sharing options...
j05hr Posted December 8, 2009 Author Share Posted December 8, 2009 Hmm this is what the source code is showing, <div id="result-data"><br><small style='font-size:11px;'>Found 6 listings</small><br><br><small style='font-size:11px;'>Pages: <a class="pageNumber" href="buying.php?pg=1">1</a> So it must be an html/css error? Link to comment https://forums.phpfreaks.com/topic/184369-using-a-class-in-a-link/#findComment-973302 Share on other sites More sharing options...
vinpkl Posted December 8, 2009 Share Posted December 8, 2009 your html code has some bugs. is it full html of the particular div. you dont have closing </div> and </small>. <small style='font-size:11px;'> should be <small style="font-size:11px;"> what all you have in your "pageNumber" Class. vineet Link to comment https://forums.phpfreaks.com/topic/184369-using-a-class-in-a-link/#findComment-973311 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.