Artenis Posted July 29, 2008 Report Share Posted July 29, 2008 if($row['id']==$_GET['link']){ $stils='style="width:75px;height:27px;display:block;float:left;background-image:url(\'images/aktivs.png\');"'; } else { $stils=''; } ?> <div <?php echo $stils; ?> ><a href="?link=<?php echo $row['id']; ?>"><?php echo $row['nosaukums']; ?></a></div> Viss būtu jauki, ja viss nerāītos stabiņā uz leju! :( Nesaprotu, kas par vainu, pgaidām tik gribu, lai parāda vienārindāar konkrēto stilu... Divs kurā atrodas šis iepriekš kopētais scripts ir ~700px plats tā kātas nevarēu būt pie vaias... Link to comment Share on other sites More sharing options...
andrisp Posted July 29, 2008 Report Share Posted July 29, 2008 Labāk parādi uzģenerēto HTML nevis HTML+PHP. Link to comment Share on other sites More sharing options...
NBS Posted August 2, 2008 Report Share Posted August 2, 2008 Raksti kodu tā, lai citi var arī kaut ko saprast, lūdzu. Parād mums visu kodu. if ($row['id'] == $_GET['link']) { $stils = 'style="width: 75px; height: 27px; display: block; float: left; background-image: url(\'images/aktivs.png\');" '; } else { $stils=''; } ?> <div <?php echo $stils; ?> > <a href="?link=<?php echo $row['id']; ?>"> <?php echo $row['nosaukums']; ?></a> </div> Link to comment Share on other sites More sharing options...
Recommended Posts