Myspace Comments - Loans - Gift Ideas - Personal Car Finance - Remortgages

PDA

View Full Version : Simple PHP help


jluyt
Jul 31st 2007, 3:25 pm
I am not too webb versed with PHP and want to RIGHT ALLIGN the image in the line of PHP code below:
<?php wp_list_cats('feed_image=http://www.domain.info/images/feed.gif&feed=XML Feed&optioncount=2&children=0'); ?>

How should it look?

All help will be greatly appreciated
Justin

Sohan
Jul 31st 2007, 5:30 pm
wp_list_cats() does not look like a valid function unless it's your own?

Cant you just wrap it in <div align="right"></div> ??

chikabc
Jul 31st 2007, 5:34 pm
from what i understand, your problem is html/xhtml/css instead of php.

But if your code returns an image file to the browser, enclose it with the <img /> (onless you are sending this: herder("Content-Type: image/gif"); ) and use the align property to align the image thus:

<img src="img/5_p1.jpg" width="166" height="121" align="right" />

Let us know if this helps

jluyt
Jul 31st 2007, 8:38 pm
Thanks for trying to help me... I really need help. Here is the full PHP code... I still do not know where to put the allignment:

<li id="Categories">
<h2>Article Categories</h2>
<ul>
<?php wp_list_cats('feed_image=http://www.txlocal.info/images/feed.gif&feed=XML Feed&optioncount=2&children=0'); ?>
</ul>
</li>

chikabc
Aug 1st 2007, 2:42 am
OK let us see the output of this code so that we can know where the image is

jluyt
Aug 1st 2007, 9:01 am
see attached

chikabc
Aug 1st 2007, 9:33 am
Ok. what i wanted was the html output

The best thing to do in this case is to dig into the "wp_list_cats()" function, find who is reponsible for outputing the html that includes the image. This should contain <img /> tag, align it to the left thus:

Lazy Method is to do this at the head of your html page:
<style type="text/css">
li img{
float: right;
}

li{
clear: both;
}
</style>

I call this a lazy method because it's simple but could cause other problems which will be difficault to sort if you don't know css

Finally,
if you post this function, wp_list_cats(), somebody will sort it for you widthin a second

good luck