Pagina 1 van 1
Ie doet vervelend met achtergrond ( opgelost )
Geplaatst: 09 jun 2007, 03:28
door special18
Hallo mensen, ik zit met een probleem.
Ik wil graag via een simpel iframe wat advertenties includen onder de streams van de media, nu is het probleem dat in firefox het frame de goeie kleur geeft en in IE weer niet gewoon blank wit. Kan iemand even de php code nalopen kijken wat er fout is?
alvast bedankt.
Voorbeeld image:
http://img87.imageshack.us/img87/6338/v ... eemba7.jpg
Code: Selecteer alles
<?php
$ad = file('2link'); //get the ads
$count = file_get_contents('1count'); //get the current ad to display
//just put them in their own vars for simplicity
//two ads for 468x60 banner - $a to $d for ad1 and $f to $i for ad2
if (isset($ad[$count+0]))
$a = $ad[$count+0]; //title
if (isset($ad[$count+1]))
$b = $ad[$count+1]; //description line 1
if (isset($ad[$count+2]))
$c = $ad[$count+2]; //description line 3
if (isset($ad[$count+3]))
$d = $ad[$count+3]; //URL
if (isset($ad[$count+5]))
$f = $ad[$count+5]; //title ad 2
if (isset($ad[$count+6]))
$g = $ad[$count+6]; //description line 1
if (isset($ad[$count+7]))
$h = $ad[$count+7]; //description line 3
if (isset($ad[$count+8]))
$i = $ad[$count+8]; //URL
if (isset($ad[$count+10]))
$k = $ad[$count+10]; //title ad 3
if (isset($ad[$count+11]))
$l = $ad[$count+11]; //description line 1
if (isset($ad[$count+12]))
$m = $ad[$count+12]; //description line 3
if (isset($ad[$count+13]))
$n = $ad[$count+13]; //URL
if (isset($ad[$count+15]))
$p = $ad[$count+15]; //title ad 4
if (isset($ad[$count+16]))
$q = $ad[$count+16]; //description line 1
if (isset($ad[$count+17]))
$r = $ad[$count+17]; //description line 3
if (isset($ad[$count+18]))
$s = $ad[$count+18]; //URL
?>
<style type="text/css">
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<?
//display the banner
echo "<table><tr><td width=\"25%\">";
if (isset($a) && isset($b) && isset($c) && isset($d)) {
echo '<a href="'.$d.'" target="_blank"><b>'.$a.'</b></a><br />';
echo $b.' ';
echo $c;
}
echo "</td><td width=\"25%\">";
if (isset($f) && isset($g) && isset($h) && isset($i)) {
echo '<a href="'.$i.'" target="_blank"><b>'.$f.'</b></a><br />';
echo $g.' ';
echo $h;
}
echo "</td><td width=\"25%\">";
if (isset($k) && isset($l) && isset($m) && isset($n)) {
echo '<a href="'.$n.'" target="_blank"><b>'.$k.'</b></a><br />';
echo $l.' ';
echo $m;
}
echo "</td><td width=\"25%\">";
if (isset($p) && isset($q) && isset($r) && isset($s)) {
echo '<a href="'.$s.'" target="_blank"><b>'.$p.'</b></a><br />';
echo $q.' ';
echo $r;
}
echo "</td></tr><tr><td colspan=\"2\" class=\"foot\">
<a class=\"foot\" href=\"javascript:location.reload(true)\">Refresh Links</a></td>
<td colspan=\"2\" class=\"foot\" align=\"right\">
<a class=\"foot\" href=\"http://www.seolinkexchange.com\">rss-wiki Link Exchange</a> </td>
</tr></table>";
//update the count file so we get new ads each time the page loads
if (count($ad) <= $count+20)
file_put_contents('1count', 0); //end of list reset back to start, not randon sequence
else
file_put_contents('1count', $count+20);
/* Note the file format of 2link is paramount or data will not be in sync
really did not want to have to create a database to show a few links */
?>
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 08:59
door ElbertF
Je kan de iframe zelf nog een achtergrondkleur geven, ik kan uit de code niet opmaken of je dat hebt gedaan. Zou moeten werken in alle browsers.
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 16:37
door special18
Hm I see nee dat heb ik dus niet, kan iemand mij die code overhandiger waarmee ik het ertussen kan gooien?
Code: Selecteer alles
<CENTER><IFRAME WIDTH="760" VSPACE="100" SCROLLING="no" FRAMEBORDER="0" HEIGHT="120" SRC="http://animeresource.eu/advertising/4ad.php"> </IFRAME> <CENTER>
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 16:39
door Salomon
Zet er gewoon style="background-color: red;"
bij?
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 16:45
door ElbertF
Jup, zo dus: <IFRAME [color=#00BF00]style="background-color: red;"[/color] WIDTH="760"
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 16:53
door special18
zeer bedankt, kon die code zo 123 effe nie vinden
EDIT:
Dit zie ik dus ook alleen in firefox <_<
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:02
door ElbertF
Als je een linkje geeft kan ik 't waarschijnlijk wel oplossen.
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:07
door special18
Natuurlijk voorbeeldlink :
http://animeresource.org/advertising/index.htm --< iframe
http://animeresource.eu/advertising/4ad.php --< advertenties
Btw domaisn boeien niet leiden beide naar zelfde doel vindt alleen leuk om er 20 domaisn achter te zetten xd
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:15
door Salomon
Wat dacht je er trouwens van om je iframe IN de html te zetten?
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:21
door special18
k naja correct coderen is niet zo van belang maar die kleur wel, moet het php bestandje gewoon niet grijs worden zou dat niet een oplossing zijn kan iemand me daarvoor anders de background code voor geven?
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:21
door ElbertF
De HTML van pagina in de iframe klopt niet. Deze moet ook html en body tags hebben, de body kun je op dezelfde manier een andere achtergrondkleur geven zodat IE het ook goed weergeeft.
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:22
door Salomon
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:30
door special18
Ik volg het totaal niet meer, en snap niet wat je bedoelt. Html van het iframe is fout dus dat regeltje code wat is dan wel de goeie code? En als de achtergrond verandert kan worden van de php pagina naar dezelfde achtergrond van de pagina waar hij in gaat zou probleem toch opgelost zijn ?
Maar als ik een achtergrond code invoeg in de 4ad.php weergeeft hij hem alleen in firefox zou iemand het willen corrigeren aub
Code: Selecteer alles
<?php
$ad = file('2link'); //get the ads
$count = file_get_contents('1count'); //get the current ad to display
//just put them in their own vars for simplicity
//two ads for 468x60 banner - $a to $d for ad1 and $f to $i for ad2
if (isset($ad[$count+0]))
$a = $ad[$count+0]; //title
if (isset($ad[$count+1]))
$b = $ad[$count+1]; //description line 1
if (isset($ad[$count+2]))
$c = $ad[$count+2]; //description line 3
if (isset($ad[$count+3]))
$d = $ad[$count+3]; //URL
if (isset($ad[$count+5]))
$f = $ad[$count+5]; //title ad 2
if (isset($ad[$count+6]))
$g = $ad[$count+6]; //description line 1
if (isset($ad[$count+7]))
$h = $ad[$count+7]; //description line 3
if (isset($ad[$count+8]))
$i = $ad[$count+8]; //URL
if (isset($ad[$count+10]))
$k = $ad[$count+10]; //title ad 3
if (isset($ad[$count+11]))
$l = $ad[$count+11]; //description line 1
if (isset($ad[$count+12]))
$m = $ad[$count+12]; //description line 3
if (isset($ad[$count+13]))
$n = $ad[$count+13]; //URL
if (isset($ad[$count+15]))
$p = $ad[$count+15]; //title ad 4
if (isset($ad[$count+16]))
$q = $ad[$count+16]; //description line 1
if (isset($ad[$count+17]))
$r = $ad[$count+17]; //description line 3
if (isset($ad[$count+18]))
$s = $ad[$count+18]; //URL
?>
<style type="text/css">
<body bgcolor="#C0C0C0">
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<?
//display the banner
echo "<table><tr><td width=\"25%\">";
if (isset($a) && isset($b) && isset($c) && isset($d)) {
echo '<a href="'.$d.'" target="_blank"><b>'.$a.'</b></a><br />';
echo $b.' ';
echo $c;
}
echo "</td><td width=\"25%\">";
if (isset($f) && isset($g) && isset($h) && isset($i)) {
echo '<a href="'.$i.'" target="_blank"><b>'.$f.'</b></a><br />';
echo $g.' ';
echo $h;
}
echo "</td><td width=\"25%\">";
if (isset($k) && isset($l) && isset($m) && isset($n)) {
echo '<a href="'.$n.'" target="_blank"><b>'.$k.'</b></a><br />';
echo $l.' ';
echo $m;
}
echo "</td><td width=\"25%\">";
if (isset($p) && isset($q) && isset($r) && isset($s)) {
echo '<a href="'.$s.'" target="_blank"><b>'.$p.'</b></a><br />';
echo $q.' ';
echo $r;
}
echo "</td></tr><tr><td colspan=\"2\" class=\"foot\">
<a class=\"foot\" href=\"javascript:location.reload(true)\">Refresh Links</a></td>
<td colspan=\"2\" class=\"foot\" align=\"right\">
<a class=\"foot\" href=\"http://www.seolinkexchange.com\">rss-wiki Link Exchange</a> </td>
</tr></table>";
//update the count file so we get new ads each time the page loads
if (count($ad) <= $count+20)
file_put_contents('1count', 0); //end of list reset back to start, not randon sequence
else
file_put_contents('1count', $count+20);
/* Note the file format of 2link is paramount or data will not be in sync
really did not want to have to create a database to show a few links */
?>
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:34
door ElbertF
Het gaat om deze pagina:
http://animeresource.eu/advertising/4ad.php
Dit is de broncode:
- Spoiler: bekijk
Code: Selecteer alles
<style type="text/css">
<body bgcolor="#C0C0C0">
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<table><tr><td width="25%"><a href="http://www.animeresource.org/test" target="_blank"><b>Advertise here
</b></a><br />people will watch 30min long
at your add, for 25 euro a month.
</td><td width="25%"></td><td width="25%"></td><td width="25%"></td></tr><tr><td colspan="2" class="foot">
<a class="foot" href="javascript:location.reload(true)">Refresh Links</a></td>
<td colspan="2" class="foot" align="right">
<a class="foot" href="http://www.seolinkexchange.com">rss-wiki Link Exchange</a> </td>
</tr></table>
Zoals je ziet begint het met een style-tag, vervolgens een body en dan CSS code. Daar moet je even een fatsoenlijke HTML pagina van maken, en de body een achtergrondkleur geven met CSS.
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:41
door special18
ja die heb ik net hierboven gedumpt

Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 17:58
door ElbertF
Ik heb niet alles nagelopen, maar dit zou moeten werken:
- Spoiler: bekijk
Code: Selecteer alles
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body style="background-color: red;">
<?php
$ad = file('2link'); //get the ads
$count = file_get_contents('1count'); //get the current ad to display
//just put them in their own vars for simplicity
//two ads for 468x60 banner - $a to $d for ad1 and $f to $i for ad2
if (isset($ad[$count+0]))
$a = $ad[$count+0]; //title
if (isset($ad[$count+1]))
$b = $ad[$count+1]; //description line 1
if (isset($ad[$count+2]))
$c = $ad[$count+2]; //description line 3
if (isset($ad[$count+3]))
$d = $ad[$count+3]; //URL
if (isset($ad[$count+5]))
$f = $ad[$count+5]; //title ad 2
if (isset($ad[$count+6]))
$g = $ad[$count+6]; //description line 1
if (isset($ad[$count+7]))
$h = $ad[$count+7]; //description line 3
if (isset($ad[$count+8]))
$i = $ad[$count+8]; //URL
if (isset($ad[$count+10]))
$k = $ad[$count+10]; //title ad 3
if (isset($ad[$count+11]))
$l = $ad[$count+11]; //description line 1
if (isset($ad[$count+12]))
$m = $ad[$count+12]; //description line 3
if (isset($ad[$count+13]))
$n = $ad[$count+13]; //URL
if (isset($ad[$count+15]))
$p = $ad[$count+15]; //title ad 4
if (isset($ad[$count+16]))
$q = $ad[$count+16]; //description line 1
if (isset($ad[$count+17]))
$r = $ad[$count+17]; //description line 3
if (isset($ad[$count+18]))
$s = $ad[$count+18]; //URL
?>
<style type="text/css">
body {
background-color: red;
}
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<?
//display the banner
echo "<table><tr><td width=\"25%\">";
if (isset($a) && isset($b) && isset($c) && isset($d)) {
echo '<a href="'.$d.'" target="_blank"><b>'.$a.'</b></a><br />';
echo $b.' ';
echo $c;
}
echo "</td><td width=\"25%\">";
if (isset($f) && isset($g) && isset($h) && isset($i)) {
echo '<a href="'.$i.'" target="_blank"><b>'.$f.'</b></a><br />';
echo $g.' ';
echo $h;
}
echo "</td><td width=\"25%\">";
if (isset($k) && isset($l) && isset($m) && isset($n)) {
echo '<a href="'.$n.'" target="_blank"><b>'.$k.'</b></a><br />';
echo $l.' ';
echo $m;
}
echo "</td><td width=\"25%\">";
if (isset($p) && isset($q) && isset($r) && isset($s)) {
echo '<a href="'.$s.'" target="_blank"><b>'.$p.'</b></a><br />';
echo $q.' ';
echo $r;
}
echo "</td></tr><tr><td colspan=\"2\" class=\"foot\">
<a class=\"foot\" href=\"javascript:location.reload(true)\">Refresh Links</a></td>
<td colspan=\"2\" class=\"foot\" align=\"right\">
<a class=\"foot\" href=\"http://www.seolinkexchange.com\">rss-wiki Link Exchange</a> </td>
</tr></table>";
//update the count file so we get new ads each time the page loads
if (count($ad) <= $count+20)
file_put_contents('1count', 0); //end of list reset back to start, not randon sequence
else
file_put_contents('1count', $count+20);
/* Note the file format of 2link is paramount or data will not be in sync
really did not want to have to create a database to show a few links */
?>
</body>
</html>
Re: Ie doet vervelend met achtergrond
Geplaatst: 09 jun 2007, 18:04
door special18
Yup nu is hij rood, geweldig elbert onzettend bedankt.