Sura 1 Artworks

Acrylmalerei, Mischtechniken, Webdesign

Posts Tagged ‘display:block’

CSSplay: Inline links – block styling

Posted by sura1 - 27. Oktober 2008

Bookmark and Share

http://www.cssplay.co.uk/menu/inline-links.html

Information – Erklärung zum Artikel

Stu Nicholl von www.cssplay.co.uk

Have you ever wanted to style your inline links as if they were blocks? Well it will be possible when all browsers include the style ‚inline-block‘, but until then this is one way to do it.
No messing around with ‚display:block;‘ / ‚display:inline; / float:left; etc. this method, seen above, uses nothing more than a ‚textarea‘ which is basically an inline block.
It is valid to place a textarea within a link and then style this to remove the default styles and replace them with your own. This includes background images, width, height, font-size, font-family, line-height etc. and using these we can produce a rollover background image change (well a background-position change) and have lovely inline block links.
Tested in IE6, IE7, Firefox, Opera, Safari(PC) and Google Chrome. Opera doesn’t quite get the vertical text position right.

Hinweise:

Sie dürfen dieses Beispiel lt. Copyright-Bestimmungen sowohl in Ihre private Webseite einbinden als auch in Ihren kommerziellen Projekten verwenden. Ein Hinweis auf die Webseite www.cssplay.co.uk ist nicht erforderlich, wird jedoch gerne gesehen.

Wenn Sie Probleme mit der Einbindung der Beispiele in Ihre Webseiten haben, können Sie sich mit Stu Nicholls per E-Mail in Verbindung setzen!

Sehen Sie nachfolgend meine Bearbeitung:

Mein Beispiel ist eng engelehnt an die Vorlage von Stu Nicholls und behandelt im Text die Person Albert Einstein (Ansehen: Anklicken der Grafik oder des Demo-Buttons; Download: 53KB – Zipfile)

Posted in CSS-Tricks | Verschlagwortet mit: , , , , , , | Leave a Comment »