Rangen Gedoe

Gestart doorSmiegles10 reacties51 weergaven

11 berichten · pagina 1 van 1

Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
He ik heb Dit stukje Script

<style type="text/css">
body{
    background-image: url(water.png);
}
.back{
border : 0 solid #000;
    height:675px;
    width:1100px;
        margin : 0 auto;
        font-family : Tahoma, Arial, sans-serif;
        font-size : 10pt;
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]]  >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]] =<[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700]){[/COLOR] 
        background[COLOR= #007700]-[/COLOR]image[COLOR= #007700]:[/COLOR] url[COLOR= #007700]([/COLOR][COLOR= #DD0000]gras.png[/COLOR][COLOR= #007700]);
}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]{[/COLOR] ?>
if($Row[uRang]  >= 6 && $Row[uRang] =< 10){ 
        background-image: url(gras.png);
[COLOR= #0000BB]<?[/COLOR] [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] ?>
        background-image: url(gras.png);
[COLOR= #0000BB]<?[/COLOR] [COLOR= #007700]}[/COLOR] ?>
}
a, a:hover, a:active, a:visited{
    color:#000;
    text-decoration:none;
}
.mtop{
    background-image:url(images/mtop.png);
    width:158px;
    height:36px;
    margin-left:1px;
    margin-top:1px;
}
.mmid{
    background-image:url(images/mmid.png);
    width:154px;
    margin-top:0px;
    margin-left:1px;
    padding-left:4px;
}
</style>


Hoe zorg ik ervoor dat mensen met rang 1 Tot 5
background-image: url(gras.png); als BG hebben en dan mensen met rang 6 tot 10 weer een andere Include zoals background-image: url(gras2.png);
0
Berichten
994
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Waarom heb je if uit de PHP-Tags?
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het is de bedoeling dat als iets zo is dat hij dat doet
0
Berichten
994
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je haalt hem uit de PHP-Tags en dan doet hij het niet nee..
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
je maak 2 verschillende divs in je css met allebei verschillende backgrounds

#div1 {background: url(locatie);} <voor rang 1 t/m 5
#div1 {background: url(locatie2);} , voor rang 6 t/m 10


en dan in je index.php zet je de 2 verschillen de divs

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]]   >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]] =<[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700]){[/COLOR] 
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="div1"></div>[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] 
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div id="div2"></div>[/COLOR][COLOR= #007700];
}[/COLOR]
?>


je werkt nu met php in je css en dat kan niet wink
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Parse error: syntax error, unexpected < in /home/lubbo/domains/smiegles.nl/public_html/**********/game.php on line 82

Krijg ik dan?
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Marjolein:
Je had iets fout gedaan biggrin Je had 2x div1 emo
#div1 {background: url(locatie);} <voor rang 1 t/m 5
#div2 {background: url(locatie2);} , voor rang 6 t/m 10


@Marjolein:
Je kan wel een dynamische css maken met php erin wink
@Smiegles:
Van de PHP tag "background-image" heb ik nog nooit gehoord emo
<style type="text/css">
body{
    background-image: url(water.png);
}
.back{
border : 0 solid #000;
    height:675px;
    width:1100px;
        margin : 0 auto;
        font-family : Tahoma, Arial, sans-serif;
        font-size : 10pt;
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]]   >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]] =<[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700])){[/COLOR] ?>
        background-image: url(gras.png);
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]]   >=[/COLOR] [COLOR= #0000BB]6[/COLOR][COLOR= #007700]) && ([/COLOR][COLOR= #0000BB]$Row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]] =<[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700])){[/COLOR]  ?>
        background-image: url(gras.png);
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] ?>
        background-image: url(gras.png);
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] ?>
}
a, a:hover, a:active, a:visited{
    color:#000;
    text-decoration:none;
}
.mtop{
    background-image:url(images/mtop.png);
    width:158px;
    height:36px;
    margin-left:1px;
    margin-top:1px;
}
.mmid{
    background-image:url(images/mmid.png);
    width:154px;
    margin-top:0px;
    margin-left:1px;
    padding-left:4px;
}
</style>
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Superb schreef:
@Marjolein:
Je had iets fout gedaan biggrin Je had 2x div1 emo
#div1 {background: url(locatie);} <voor rang 1 t/m 5
#div2 {background: url(locatie2);} , voor rang 6 t/m 10
Ja ach, kan gebeuren. TS kan ook zelf dit toch wel verzinnen, aan alles letterlijk voorkauwen heb je ook niks yummie
Superb schreef:
Je kan wel een dynamische css maken met php erin wink maar dit gaat niet met een extern css bestand. Alleen als je m in je index pagina toevoegt
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maar het kan wel als je er met .htaccess .css van maakt biggrinGewoon een bestandje layout.php maken ofzo en daar dan in:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Content-Type: text/css"[/COLOR][COLOR= #007700]);[/COLOR]
?>


En dan met htaccess layout.css van maken biggrin
@Smiegles: Al gelukt biggrin?
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jha dankje Bas ;D
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geen Probleem biggrin
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren