[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - menu - keuze met achtergrond
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

menu - keuze met achtergrond

Het echte opmaakwerk, alles vragen over HTMLen, CSSen en Javascripten.

menu - keuze met achtergrond

Berichtdoor julien » 03 jun 2009 13:38

Ik ben bezig met de site van onze zuster firma te updaten.
http://www.decoenedecor.be/v2/

Nu zou ik willen dat in het menu, de achtergrond van de laatst gekozen knop licht grijs blijft. Hoe kan ik dit het eenvoudigst doen?

Bedankt!
Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk

Re: menu - keuze met achtergrond

Berichtdoor KillerSponge » 03 jun 2009 13:52

Het eenvoudigst is dit met php te doen: gewoon kijken welke knop er 'geselecteerd' is, en die een bepaalt id meegeven waar een stukje css achter hangt :)
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: menu - keuze met achtergrond

Berichtdoor julien » 03 jun 2009 14:00

Hm...

Mag ik nog eens misbruik maken van uw goedheid?

Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk

Re: menu - keuze met achtergrond

Berichtdoor KillerSponge » 03 jun 2009 18:06

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: menu - keuze met achtergrond

Berichtdoor julien » 03 jun 2009 20:36

dank je wel hoor!

Ik test het morgen even uit. 8-)
Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk

Re: menu - keuze met achtergrond

Berichtdoor julien » 04 jun 2009 09:00

Ik ben aan het testen geweest, maar 't wil niet lukken...
De bron is nu:
<div id="navigatie">
<ul>
<li><a<?php if($page["p"]=='start' ? ' id="selected"' : '')?> href="index.php?p=start">startpagina</a></li>
<li><a<?=($_GET['p']=='start' ? ' id="selected"' : '')?> href="index.php?p=start">startpagina</a></li>
<li><a<?php ($_GET['p']=='start' ? ' id="selected"' : '')?> href="index.php?p=start">startpagina</a></li>
<li><a href="index.php?p=start">startpagina</a></li>
<li><a href="index.php?p=geschiedenis">geschiedenis</a></li>
<li><a href="index.php?p=realisaties">realisaties</a></li>
<li><a href="index.php?p=contact">contact</a></li>
<li><a href="index.php?p=ligging">ligging</a></li>
</ul>
</div>
van het menu.
De eerste is een test van mij, wat gepruts van wat ik op het net vond, de 2de is de uwe, de 2de is de uwe met een kleine aanpassing.
Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk

Re: menu - keuze met achtergrond

Berichtdoor Derk » 04 jun 2009 09:06

<!-- kop -->

<div id="navigatie">
<ul>
<li><a href="index.php?p=start">startpagina</a></li>
<li><a<?php if ($_GET['p']=='start') echo 'id="grijs"'; else echo'id="nietgrijs"';?> href="index.php?p=start">startpagina</a></li>
<li><a href="index.php?p=start">startpagina</a></li>
<li><a href="index.php?p=start">startpagina</a></li>
<li><a href="index.php?p=geschiedenis">geschiedenis</a></li>
<li><a href="index.php?p=realisaties">realisaties</a></li>
<li><a href="index.php?p=contact">contact</a></li>
<li><a href="index.php?p=ligging">ligging</a></li>
</ul>
</div><!-- menu -->


Niet getest. Killer gebruikt short tags, dat staat vaak uit.
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: menu - keuze met achtergrond

Berichtdoor julien » 04 jun 2009 10:52

Bedankt, nu werkt het zoals het hoort!

Nu zou ik misschien nog een stapje verder durven gaan. :D
Bij realisaties heb ik een klein foto album. Als ik nu een stap in dit album ga is 'realisaties' niet meer actief.

Zou ik ergens een soort van groep kunnen maken waarin ik alle album sub namen kan bundelen? Dan zou ik de stap van realisaties vervangen door:
<?php if ($_GET['p']=='groep realisaties') echo 'id="grijs"'; else echo'id="nietgrijs"';?>
Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk

Re: menu - keuze met achtergrond

Berichtdoor KillerSponge » 04 jun 2009 13:20

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: menu - keuze met achtergrond

Berichtdoor julien » 04 jun 2009 21:52

Schitterend, dat werkt ook alweer perfect. 8-)
Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk


Keer terug naar HTML, CSS, Javascript



cron