PDA

View Full Version : list style


hussam81
06-13-2013, 11:37 AM
heloo..



How can make like this list using dreamweaver html code and php for calling data from database and when select any item keep selected ???





see the image ..

http://im38.gulfup.com/S6pgx.png

edbr
06-14-2013, 05:08 AM
loop through your table

<ul>
<?php
foreach($dbh->query('select * from table ') as $row) {
<li><?php echo $row['title'] ;?> </li>
<?php } ?>
</ul>

if you want a link , then return the path also from your database ie

<ul>
<?php
foreach($dbh->query('select * from shipping ') as $row) {
<li>
<a href="<?php echo $row['link'] ;?>"><?php echo $row['title'] ;?></a></li>
<?php } ?>
</ul>

hussam81
06-14-2013, 04:33 PM
Thank you for reply .

what is the css code for keep items selected with the circle on the left side ).on click with change font color

edbr
06-15-2013, 01:09 AM
it looks like they usa an image ul {
list-style-image: url(bullet.gif);
}
colour changes are part of a link styling (active)

hussam81
06-15-2013, 08:32 AM
thank i appreciate your reply

I mean if i click second item in the list (Dermatology, Venereology & Laser Skin Surgery) then it will be selected and active and the same for other items

is it using a function like javascript (for keep selected even pressed next item and the bullet select )

what is the technique is using here ??