Current menü in Laravel 4
Öffnen die routers.php und diesen Ausschnitt einfügen
HTML::macro('menue_link', function($route, $text) {
if( Request::path() == $route ) {
$aktive = "class = 'aktive'";
}
else {
$aktive = '';
}
return '
<li ' . $aktive . '>' . link_to($route, $text) . '</li>
';
});
Deine blade template für Navigationsmenü sollte wie folgt sein:
<ul>
{{ HTML::menue_link("/", 'Home' ) }}
{{ HTML::menue_link("blog", 'Blog' ) }}
</ul>
Targeting only Firefox with CSS
Sometimes it is the Gecko engine (Firefox) that misbehaves. What would be best way to target only Firefox with your CSS rules and not a single other browser? That is, not only should Internet Explorer ignore the Firefox-only rules, but also WebKit and Opera should.
1. Target all versions of Firefox
@-moz-document url-prefix() {
.content {
color:#000;
}
}
2. Target versions of Firefox 3
html>/**/body .content, x:-moz-any-link, x:default {
color:#000;
}
3. Target versions of Firefox 2
html>/**/body .content, x:-moz-any-link {
color:#000;
}