Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

waagerechtes Dropdown-Menue mit CSS

Empfohlene Antworten

Veröffentlicht

Hallo wiedermal :-)

Ich bin gerade dabei ein waagerechtes Dropdownmenue mit CSS zu erstellen. Habe es schon soweit geschafft, dass die erste Ebene waagerecht dargestellt wird. Jetzt fehlt "nur" noch die Aufklappbare 2. Ebene.

Habe dieses Tutorial gefunden: Dropdown Menü - Ein barrierefreies Typo3-Menü erstellen | mortox.de

allerdings ist mir das CSS etwas suspekt (weil ich (noch) nicht allzu firm darin bin).

Hier mal mein bisheriger Code, der folgendes Layout erzeugt:

Level 1.1 (onmouseover: farbig) Level 1.2 (") Level 1.3 (") usw...


#top-menu2 {

	position: relative;

	height: 20px;

	background: #FFFFFF;

	margin: 0px;

	padding-bottom: 8px;

}


#top-menu2 ul {

	list-style: none;

	margin: 0;

	padding: 0;

}


#top-menu2 ul a, #top-menu2 ul .cur {

	float: left; 

	display: block;

	line-height: 20px;

	text-decoration: none;

	font-size: 11px;

	font-weight: bold;

	background-color: #ededed; 

	border-right-width: 0px;

	border-right-style: solid;

	border-right-color: #FFFFFF;

	padding: 0 12px;

	margin: 0;

	color: #000000;

}


#top-menu2 ul a:hover, #top-menu2 ul .act a {

	color: #FFFFFF;

	background-color: #AB1315;

	font-size: 11px;

	font-weight: bold;

}


#top-menu2 li {

	float: left; 

	padding: 0;

	margin: 0;

}  


Waere nett, wenn ein faehiger CSSler mir einen Tipp geben koennte!

Danke!

Stefan

öhm, was genau geht willst du denn wissen?

Eine präzise fragestellung würde sicher helfen...

  • Autor

Also das Stylesheet, was ich mitgeschickt habe, stellt das Menü schonmal waagerecht dar. Ich würde nun gerne wissen, wie ich, basierend auf diesem Stylesheet, die nächste Ebene als Dropdown-Liste darstellen kann. Also genauer, wie ich die ui und li-Elemente der nächsten Ebene formatieren muss. Einfach das CSS aus dem Tutorial zu übernehmen geht nicht, da meins schon zu "anders" aufgebaut ist. Ein Versuch, einfach die Bezeichner zu ändern, schlug fehl... Deshalb muss ich "selber bauen".

War das präzise genug? Wäre für Hilfe echt dankbar!

Gruß Stefan

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.