Beispiel:CSS-mehrspaltige Layouts-4.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche

<!DOCTYPE html> <html lang="de"> <head>

 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" media="screen" href="./Beispiel:Grundlayout.css">  
 <style>

.media {

 list-style-type: none;
 max-width: 30em;

}

.media li {

 display: grid;
 grid-template-columns: 7em 1fr;
 grid-template-rows: 2em 3em;
 gap: 1em;

margin-bottom: 1em; }

.media li>img {

 grid-row: 1 / 3;
 width: 6em;

}

.media h3 {

 font: bold 1.2em/1.5 Helvetica, Verdana, sans-serif;

margin-top: 0; }

.media p {

 font: 100 0.75em/1.5 Georgia, Times New Roman, serif;

margin: 0; }

li:hover {

 background: #F1F3F4;
 cursor: pointer;

}


 </style>
 <title>Media-Objekt</title>

</head> <body>

Media-Objekt im Grid Layout

</body> </html>