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.

Inline-Element vertikal positionieren (Link in dynamischem Button)

Empfohlene Antworten

Veröffentlicht

Hallo,

ich steh bei einer kleinen CSS-Sache irgendwie auf dem Schlauch und hoffe, ihr könnt mir helfen.

Und zwar will ich nen Link in einem Button vertikal zentrieren. Da die Höhe statisch ist, reicht auch Trickserei mit padding/margin-top. Nur funktioniert das im aktuellen IE nicht und auch bei Firefox sieht's nicht ganz sauber aus, wenn man drauf klickt.

Betrachtet bitte zur Veranschaulichung den Screenshot im Anhang.

Meine CSS-Definition:

.link_f {

float: left;

margin-right: 10px;

}


.link_l {

background: url(bg/link_l.gif) left no-repeat;

height: 27px;

}


.link_r {

background: url(bg/link_r.gif) right no-repeat;

height: 27px;

}
Das rechte Bild ist das kurze Ende, das das linke überlagern soll, der Button soll sich dem Inhalt also nur der Länge nach anpassen. Die Formatierung zum Link (damit wird der Link im Firefox mittig dargestellt, nicht aber im IE):
.middle-text a

{

	vertical-align: middle;

	color: #ffffff;

	padding: 10px 8px 0 8px;

}

Ich wär sehr froh, wenn mir hier jemand mit Ahnung sagen kann, wie ich das vernünftigerweise umsetzen soll.

Dankeschön!

KnUlP

post-58083-14430448670832_thumb.jpg

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.