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.

Empfohlene Antworten

Veröffentlicht

Hallo Zusammen,

ich habe mal wieder ein kleines Problem an dem ich nicht weiterkomme.

Ich habe Links die beim Hover ein wenig Dicker und unterstrichen dargstellt werden sollen. Das funktioniert auch.

Jedoch möchte ich das nicht für Überschriften (H3) die ebenfalls Link enthalten, da diese ja bereit fetter Dargstellt sind.

Jedoch bekomme ich das nicht hin. :-(

Ich habe folgenden CSS Code:

.h3-nav{
    font-family: Arial;
    color: #00B388;
}

a:visited, a:link, a:active
{
    text-decoration: none;
    color: #00B388;
}

a:hover{
color: #00B388;
text-decoration:underline;
font-weight:bolder;
}

h3 a:hover{
color: #00B388;
text-decoration:underline;
}

und folgenden HTML Ausschnitt:

<h3 class="h3-nav"><a href="../index.html">Home</a></h3>

<ul class="ul-navi">
     <li><a href="link1.html">Link1</a></li>
     <li><a href="link2.html">Link2</a></li>
     <li><a href="Link3.html">Link3</a></li>
     <li><a href="Link4.html">Link4</a></li>
</ul>

Wer kann helfen?

Grüße

Guenny0815

Eine Überschrift h3 hat für text-weight standardmäßig den Wert bold. Entweder änderst du also für alle links die Eigenschaft text-weight auf bold, dann muss du die Überschriften nicht extra beachten. Ansonsten musst du entsprechend für die Überschriften mit Links extra angeben, dass diese eben nicht den Wert bolder bekommen sollen.

h3 a:hover {
	font-weight: inherit;
}

sollte dafür reichen. Dadurch erbt der Link den Wert der Eigenschaft font-weight vom Parent h3.

Bearbeitet von Dragon8

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.