Results 1 to 10 of 12
-
16th May 2010, 01:55 PM #1OPMemberWebsite's:
maxneeds.info[html] align problem
Hi !
When i tried <img align=left src=bbb.gif><p align=left>sometext</p>
i get some <br> or top margin . How to make this at one line ?Porsche_maniak Reviewed by Porsche_maniak on . [html] align problem Hi ! When i tried <img align=left src=bbb.gif><p align=left>sometext</p> i get some <br> or top margin . How to make this at one line ? Rating: 5
-
16th May 2010, 01:59 PM #2Teh GFX Whore! ^.^
eh? screen shot + exact code please..
-
16th May 2010, 02:03 PM #3MemberWebsite's:
maxedoutdesigns.com
-
16th May 2010, 02:34 PM #4OPMemberWebsite's:
maxneeds.infoguys forget about that ..
Now i am trying other thing but i got some problems. Where do i wrong ?
Code:if($val1 >'0' && $val2=='0'){$blog_content.='<font color=green>100% voted for working links !</font>';} if($val2 >'0' && $val1=='0'){$blog_content.='<font color=red>100% voted for dead links !</font>';} elseif($val2 > $val1){$percent = number_format(($val2 * 100) / $val1); $blog_content.='<font color=red>'.$percent.'% voted for dead links !</font>';} else {if($val1 > $val2){$percent = number_format(($val1 * 100) / $val2); $blog_content.='<font color=green>'.$percent.'% voted for working links !</font>';}}
And i get Warning: Division by zero
-
16th May 2010, 03:02 PM #5Respected Member
First don't put numeric if in quotes. And to be sure it is numeric use is_numeric function like this:
Code:if ( is_numeric($val1) && is_numeric($val2) ) { if($val1 > 0 && $val2 == 0) {$blog_content.='<font color=green>100% voted for working links !</font>';} if($val2 > 0 && $val1 == 0) {$blog_content.='<font color=red>100% voted for dead links !</font>';} elseif($val2 > $val1) {$percent = number_format(($val2 * 100) / $val1); $blog_content.='<font color=red>'.$percent.'% voted for dead links !</font>';} else { if($val1 > $val2) { $percent = number_format(($val1 * 100) / $val2); $blog_content.='<font color=green>'.$percent.'% voted for working links !</font>'; } } }
-
16th May 2010, 03:30 PM #6OPMemberWebsite's:
maxneeds.infoLock Down - Helped a lot ! Thanks
-
16th May 2010, 03:38 PM #7Respected Member
Glad to help .
-
16th May 2010, 04:18 PM #8OPMemberWebsite's:
maxneeds.infoAlso just to ask..
What about if there is no value for $val2 or $val1 in the first ifs
if($val1 > 0 && $val2 == empty($val2)) is not working i think...
Because i don't get any results when having 1 value of 2
-
17th May 2010, 01:18 AM #9Respected Member
If there is no value than is_numeric should return false and fall out of the if.
-
17th May 2010, 04:21 PM #10OPMemberWebsite's:
maxneeds.infoMan i am playing with this 2 days non-stop and can't figure it out
Now i am just trying it simple as possible,but it has defects and don't know why.
Code:if (file_exists($zzz1)) {$val1=file_get_contents($zzz1);} if (file_exists($zzz2)) {$val2=file_get_contents($zzz2);} if($percent == 50){$color='orange';} if($percent > 50){$color='green';} if($percent < 50){$color='red';} if($percent == 0 && $votenum == 0){$color='darkblue';} if ($votenum >= 1){ if($val1==0){$val1=1;} if ($percent > 100){$percent=100;} $percent = number_format(($val2 * 100) / $val1);} else {$percent=0; $votenum=0;} $votenum = $val1 + $val2; if($votenum==1){$votename='vote';} else {$votename='votes';} $blog_content.='<font color='.$color.'>'.$percent.'% voted for successful download ! ('.$votenum.' '.$votename.')</font>';
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Html Problem! Website breaks apart when zoomed!
By Drag in forum Web Development AreaReplies: 5Last Post: 7th Oct 2012, 09:47 AM -
WordPress align problem
By stefan-te in forum WordpressReplies: 13Last Post: 22nd Sep 2012, 01:49 AM -
[HTML] How To Align Any Image Center !
By Rapid S in forum Web Development AreaReplies: 28Last Post: 9th Sep 2012, 11:55 AM -
html codding problem
By warezgalaxy in forum Web Development AreaReplies: 1Last Post: 6th Sep 2012, 09:32 AM -
PHP in HTML problem
By Porsche_maniak in forum Server ManagementReplies: 7Last Post: 9th Jul 2010, 08:23 PM
themaPoster - post to forums and...
Version 5.22 released. Open older version (or...