Basma Posted September 12, 2010 Report Share Posted September 12, 2010 Sveiki vai ir kāds sastapies ar problēmu šādu, norādu CSS failā krāsu piemēram melnu, bet lapā rāda kā linku zilu ? CSS fails .menu_nav { color:#333333; font-size:16px; text-align:center; border-bottom:1px solid gray; padding:5px; font-weight:bold; text-decoration:none; } menu.php <?$result2 = mysql_query ("SELECT * FROM categories", $db); if (!$result2) { echo "<p><B>Connect Error:</B></p>"; exit(mysql_error ()); } if (mysql_num_rows($result2)> 0) { $myrow2 = mysql_fetch_array ($result2); do { printf ("<p class='menu_nav'><a href='view_cat.php?cat=%s'>%s</a><p>",$myrow2["id"], $myrow2["title"]); } while ($myrow2 = mysql_fetch_array ($result2)); } else { echo "<p>Nav ierakstu</p>"; exit (); } ?> Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 12, 2010 Report Share Posted September 12, 2010 (edited) norādu CSS failā krāsu piemēram melnu, bet lapā rāda kā linku zilu ? Tu izmanto <p> elementu kuram noraadiji dotoo klasi, bet kur klase noraadiita pasam <a> ? tavs kods: printf ("<p class='menu_nav'><a href='view_cat.php?cat=%s'>%s</a><p>",$myrow2["id"], $myrow2["title"]); bet buutu jabuut: printf ("<p class='menu_nav'><a href='view_cat.php?cat=%s' class='menu_nav' >%s</a><p>",$myrow2["id"], $myrow2["title"]); vai: printf ("<a href='view_cat.php?cat=%s' ><p class='menu_nav'>%s<p></a>",$myrow2["id"], $myrow2["title"]); Edited September 12, 2010 by Grey_Wolf Quote Link to comment Share on other sites More sharing options...
Basma Posted September 12, 2010 Author Report Share Posted September 12, 2010 Grey_Wolf paldies! Quote Link to comment Share on other sites More sharing options...
mad182 Posted September 12, 2010 Report Share Posted September 12, 2010 (edited) Grey_Wolf: Tavs html's ir briesmīgs :) Norādīt klasi gan paragrāfam, gan saitei ir lieki, un ielikt bloku iekš inline elementa ir ne tikai lieki, bet arī nepareizi no standartu viedokļa. .menu_nav a { /* stuff */ } Edited September 12, 2010 by mad182 Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 12, 2010 Report Share Posted September 12, 2010 Norādīt klasi gan paragrāfam, gan saitei ir lieki, un ielikt bloku iekš inline elementa ir ne tikai lieki, bet arī nepareizi no standartu viedokļa. shajaa gadijuma vispar nepieversu tam veriibu ;) Bet vienkarshi noradiju kur ir problema, kaapec links <a> neizmanto dotoo CSS .. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.