Reputation: 127
Hello,
I have a problem with aligning text and picture inside li element. The li consist of one word and one picture (for example English [picture]). I need that picture would go to the right side and text would stay as it is (now it is goes to the left side). The code looks like:
for($i=0; $i < $rowCount; $i++){
?>
<li><a href="?lang=<?php echo $l[$i]?>"><?php echo $i?><img src="/flags/flag_of_lithuania.gif" width="20" height="10"> </a></li>
<?php
}
Now it prints language and picture, however everything aligned to the left side. Looking for any help :)
Upvotes: 0
Views: 108
Reputation: 28742
Try this
for($i=0; $i < $rowCount; $i++){
?>
<li><a href="?lang=<?php echo $l[$i]?>"><?php echo $i?><img style="float:right" src="/flags/flag_of_lithuania.gif" width="20" height="10"> </a></li>
<?php
}
Upvotes: 1