macattack Posted May 17, 2008 Share Posted May 17, 2008 I have written the following PHP code, with a CSS file included in the file "header.php". The background and text render properly, but the links don't. Does anyone have an idea why? <?php include('includes/functions.php'); define('DIRECTORY_LISTING', '../blogs'); require('header.php'); echo '<a href="index.php?edit=EditIt">Edit/delete current blog entries</a><br>'; echo '<a href="index.php?addnew=Add New">Add new blog entry for today</a><br>'; echo '<a href="index.php?addold="Add Old">Add blog entry for another date</a><br>'; require('footer.html'); ?> body {background-color: navy} h1 {text-align: center; color: white; font-family: comic sans ms; font-size: 200%} h2 {text-align: left; color: white; font-family: comic sans ms; font-size: 100%} p1 {text-align: left; color: white; font-family: comic sans ms; font-size: 100%} t1 {align: center} f1 {font-size: 10px; font-family: comic sans ms; text-align: center; color: white} a:link {text-color: red; decoration: none} a:visited {text-color: red; decoration: none} a:active {text-color: red; decoration: none} a:hover {text-color: red; decoration: underline overline} I have tested in both Safari and Firefox to no avail. Link to comment https://forums.phpfreaks.com/topic/106041-solved-links-wont-render-properly/ Share on other sites More sharing options...
AndyB Posted May 17, 2008 Share Posted May 17, 2008 change the order of link definitions - link, visited, hover, active is the correct order. Remember that from the mnemonic LoVeHAte Link to comment https://forums.phpfreaks.com/topic/106041-solved-links-wont-render-properly/#findComment-543481 Share on other sites More sharing options...
macattack Posted May 17, 2008 Author Share Posted May 17, 2008 I have performed the change, but to no avail. Thank you for the suggestion, however. Link to comment https://forums.phpfreaks.com/topic/106041-solved-links-wont-render-properly/#findComment-543486 Share on other sites More sharing options...
AndyB Posted May 17, 2008 Share Posted May 17, 2008 On closer examination of your code: This: text-color: red; decoration: none} Should be: color: red; text-decoration: none} Change the hove definition similarly Link to comment https://forums.phpfreaks.com/topic/106041-solved-links-wont-render-properly/#findComment-543506 Share on other sites More sharing options...
macattack Posted May 17, 2008 Author Share Posted May 17, 2008 Thanks a bunch! Link to comment https://forums.phpfreaks.com/topic/106041-solved-links-wont-render-properly/#findComment-543536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.