WordPress DropDown-Navigation Vorlage

Wenn Ihr mal ein Theme mit einem Menü mit mehreren Ebenen erstellen wollt, eignet sich ein Dropdown-Menü.

Für die schnelle Erstellung hier einmal der CSS-Code, den Ihr nur noch anpassen müsst. Für die Quelle vielen Dank an: How to Style WordPress Menus & Dropdowns

#main-nav	{
	height: 30px; /* set to the height you want your menu to be */
	margin: 0 0 10px; /* just to give some spacing */
}
#main-nav ul	{
	margin: 0; padding: 0; /* only needed if you have not done a CSS reset */
}
#main-nav li	{
	display: block;
	float: left;
	line-height: 30px; /* this should be the same as your #main-nav height */
	height: 30px; /* this should be the same as your #main-nav height */
	margin: 0; padding: 0; /* only needed if you don't have a reset */
	position: relative; /* this is needed in order to position sub menus */
}
#main-nav li a	{
	display: block;
	height: 30px;
	line-height: 30px;
	padding: 0 15px;
}
#main-nav .current-menu-item a, #main-nav .current_page_item a, #main-nav a:hover {
	color: #000;
	background: #ccc;
}
#main-nav ul ul { /* this targets all sub menus */
	display: none; /* hide all sub menus from view */
	position: absolute;
	top: 30px; /* this should be the same height as the top level menu -- height + padding + borders */
}
#main-nav ul ul li { /* this targets all submenu items */
	float: none; /* overwriting our float up above */
	width: 150px; /* set to the width you want your sub menus to be. This needs to match the value we set below */
}
#main-nav ul ul li a { /* target all sub menu item links */
	padding: 5px 10px; /* give our sub menu links a nice button feel */
}
#main-nav ul li:hover > ul {
	display: block; /* show sub menus when hovering over a parent */
}
#main-nav ul ul li ul {
	/* target all second, third, and deeper level sub menus */
	left: 150px; /* this needs to match the sub menu width set above -- width + padding + borders */
	top: 0; /* this ensures the sub menu starts in line with its parent item */
}

Falls Ihr den HTML-Code auch benötigt, gern:

<ul>
	<li><a href="#">Menu Item</a></li>
	<li><a href="#">Menu Item</a>
		<ul>
			<li><a href="#">Sub Menu Item</a></li>
			<li><a href="#">Sub Menu Item</a>
				<ul>
					<li><a href="#">Sub Sub Menu Item</a></li>
					<li><a href="#">Sub Sub Menu Item</a></li>
				</ul>
			</li>
		</ul>
	</li>
	<li><a href="#">Menu Item</a></li>
</ul>
Linux: SSH Port wechseln

sudo nano /etc/ssh/sshd_config Port ändern, Reboot

[Artikel lesen]

Linux: feste IP vergeben

nano /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback   # The primary network interface # auto eth0 # iface eth0 inet dhcp   auto eth0 iface eth0 inet […]

[Artikel lesen]

Linux: root Passwort zurücksetzen

Linux im Bootvorgang in Recoverymodus versetzen (Force Reboot) Recovery-Mode auswählen und starten lassen root – Zur root-Shell wechseln mount -o remount,rw / nano /etc/shadow root:!:…

[Artikel lesen]

Linux: Befehle über Konsole als anderer Benutzer ausführen

sudo -u BENUTZER BEFEHL Oder, falls es nicht funktionieren sollte: su BENUTZER -c BEFEHL

[Artikel lesen]