Jump to content
php.lv forumi

nestrādā current


ziedinjsh

Recommended Posts

Sveiki!

$show = (isset($_GET['show'])) ? $_GET['show'] : '';

echo "<p><a href='index.php?show=music' ".(($show == "music") ? "class='current'" : "")."\">Music</a></p>";

if ($show=='music'){
				echo "Music";
			}

 

šāds ir php kods preks menu

 

bet šis ir css

/* menu */
#menu{
border-top:5px solid #333333;
border-bottom:5px solid #333333;
background-color:#333333;
width:100%;
color:#FF6F0F;
}
#menu p{
margin:0px 5px 0px 5px;
border:0px solid #ff0000;
float:left;
height:30px;
font-size:25px;
}
#menu a{
color:#FF6F0F;
font-family:chiller;
font-weight:bold;
text-decoration:none;
padding:0px 10px 0px 10px;
}
#menu a:hover{
background-color:#FF6F0F;
color:#333333;
}
.current{
color:#ff0000;
background-color:#FF6F0F;
}

 

Lieta sekojošā - kad uzrakstu šādi

 #menu.current{color:#FF0000; background-color:#FF6F0F;}

tad nestrādā vispār, bet ja ir kā tagad

 .current{color:#FF0000; background-color:#FF6F0F;}

tad background strādā bet burti nav redzami.. ir vnk klucis!

 

kas varētu būt par vainu? Iespējams esmu kaut ko palaidis garām :|

 

Paldies jau iepriekš!

Edited by ziedinjsh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...