Rubikalubi
Lt. Junior Grade
- Registriert
- Mai 2013
- Beiträge
- 362
Guten Abend,
Ich habe mir jetzt endlich mal ein Buch zum Theme erstellen mit Wordpress gekauft. In dem Buch wird als Framework Bootstrap genommen. Das ging auch eigentlich alles recht gut von der Hand, bis Ich zum dynamischen Menü in Wordpress gekommen bin. Das Menü will nämlich auf biegen und brechen nicht den definierten Style von Bootstrap annehmen. Die Stylesheets sind anscheinend auch richtig eingebunden, bis auf das Menü wird nämlich alles richtig angezeigt. Dann schreibe Ich hier mal einfach die PHP Passage aus der Header.php rein und den dazugehörigen Ausschnitt aus dem Stylesheet.
und noch der CSS Code
Danke schon mal im Voraus und wenn ihr noch andere Codeschnipsel braucht einfach bescheid geben![Lächeln :) :)](/forum/styles/smilies/smile.gif)
Gruß Rubi
Ich habe mir jetzt endlich mal ein Buch zum Theme erstellen mit Wordpress gekauft. In dem Buch wird als Framework Bootstrap genommen. Das ging auch eigentlich alles recht gut von der Hand, bis Ich zum dynamischen Menü in Wordpress gekommen bin. Das Menü will nämlich auf biegen und brechen nicht den definierten Style von Bootstrap annehmen. Die Stylesheets sind anscheinend auch richtig eingebunden, bis auf das Menü wird nämlich alles richtig angezeigt. Dann schreibe Ich hier mal einfach die PHP Passage aus der Header.php rein und den dazugehörigen Ausschnitt aus dem Stylesheet.
PHP:
<?php
wp_nav_menu(
array(
'theme_location' => 'haupt-menu',
'menu_class' => 'nav' ));
?>
und noch der CSS Code
HTML:
.nav {
padding-left: 0;
margin-bottom: 0;
list-style: none;
}
.nav > li {
position: relative;
display: block;
}
.nav > li > a {
position: relative;
display: block;
padding: 10px 15px;
}
.nav > li > a:hover,
.nav > li > a:focus {
text-decoration: none;
background-color: #eee;
}
.nav > li.disabled > a {
color: #999;
}
.nav > li.disabled > a:hover,
.nav > li.disabled > a:focus {
color: #999;
text-decoration: none;
cursor: not-allowed;
background-color: transparent;
}
.nav .open > a,
.nav .open > a:hover,
.nav .open > a:focus {
background-color: #eee;
border-color: #428bca;
}
.nav .nav-divider {
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.nav > li > a > img {
max-width: none;
}
.nav-tabs {
border-bottom: 1px solid #ddd;
}
.nav-tabs > li {
float: left;
margin-bottom: -1px;
}
.nav-tabs > li > a {
margin-right: 2px;
line-height: 1.42857143;
border: 1px solid transparent;
border-radius: 4px 4px 0 0;
}
.nav-tabs > li > a:hover {
border-color: #eee #eee #ddd;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
color: #555;
cursor: default;
background-color: #fff;
border: 1px solid #ddd;
border-bottom-color: transparent;
}
.nav-tabs.nav-justified {
width: 100%;
border-bottom: 0;
}
.nav-tabs.nav-justified > li {
float: none;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 5px;
text-align: center;
}
.nav-tabs.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs.nav-justified > li > a {
margin-right: 0;
border-radius: 4px;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border: 1px solid #ddd;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li > a {
border-bottom: 1px solid #ddd;
border-radius: 4px 4px 0 0;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border-bottom-color: #fff;
}
}
.nav-pills > li {
float: left;
}
.nav-pills > li > a {
border-radius: 4px;
}
.nav-pills > li + li {
margin-left: 2px;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
color: #fff;
background-color: #428bca;
}
.nav-stacked > li {
float: none;
}
.nav-stacked > li + li {
margin-top: 2px;
margin-left: 0;
}
.nav-justified {
width: 100%;
}
.nav-justified > li {
float: none;
}
.nav-justified > li > a {
margin-bottom: 5px;
text-align: center;
}
.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs-justified {
border-bottom: 0;
}
.nav-tabs-justified > li > a {
margin-right: 0;
border-radius: 4px;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border: 1px solid #ddd;
}
@media (min-width: 768px) {
.nav-tabs-justified > li > a {
border-bottom: 1px solid #ddd;
border-radius: 4px 4px 0 0;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border-bottom-color: #fff;
}
Danke schon mal im Voraus und wenn ihr noch andere Codeschnipsel braucht einfach bescheid geben
![Lächeln :) :)](/forum/styles/smilies/smile.gif)
Gruß Rubi