Bilder etc.

Hallo, ich bin zwar nicht neu in sachen Html aber auch nicht gerade erfahren. Und ich mache gerade eine Website aber wenn ich jetzt 2Bilder nebeneinander haben will wie soll das gehen? Mit ccs die position definieren klappt nie weil ihrgentwie immer ein Bild drunter is, ich schaff es nie das die Bilder nebeneinander sind…

Kann mir da vielleicht einer helfen…?

Per Float. Mehr Infos zum Beispiel hier

oder in einer Suchmaschine deiner Wahl:

Ein Beispiel:

[html]

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>New</title>
    <style type="text/css">

/**

.images {
width: 244px;
margin: 0 auto;
}

.images img {
float: left;
width: 100px;
height: 100px;
border: 1px solid red;
margin: 10px;
}

    </style>
</head>

<body>
    <p>Morbi sed enim lectus. Sed vel metus diam, sed vestibulum neque. Nulla facilisi. Maecenas aliquet commodo ornare. Suspendisse ac adipiscing tellus. Vestibulum consectetur purus mi, ac porttitor augue. Aliquam nulla felis, dapibus sed condimentum a, tempor sed arcu. Quisque in nisi ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse ac lacus eros. Sed varius aliquam tortor, eget tristique mauris placerat laoreet. Phasellus lacinia lacus sed tortor cursus adipiscing.</p>

    <div class="images clear">

        <img />
        <img />
        <img />
        <img />

    </div>


    <p>Morbi sed enim lectus. Sed vel metus diam, sed vestibulum neque. Nulla facilisi. Maecenas aliquet commodo ornare. Suspendisse ac adipiscing tellus. Vestibulum consectetur purus mi, ac porttitor augue. Aliquam nulla felis, dapibus sed condimentum a, tempor sed arcu. Quisque in nisi ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse ac lacus eros. Sed varius aliquam tortor, eget tristique mauris placerat laoreet. Phasellus lacinia lacus sed tortor cursus adipiscing.</p>

</body>
[/html]

also das script oben ist schon etwas lang wenn ich das richtig verstehe in kurzform so oder:


[ul]
[li]<div style="float:left; width:100%; top: 40px; usw...">[/li][li]<p>blablabla</p>[/li][li]</div>[/li][li]<p></p>[/li][/ul]

so??

Lies dir bitte einen Grundlagenartikel zum Thema durch. Der oben verlinkte ist zugegebenermaßen etwas „geschwätzig“. Viel kürzer, aber wohl weniger gut verständlich ist’s bei SELFHTML (wenn du’s erstmal nur kopieren willst):

Bessere Quellen finde ich gerade leider nicht.

Die Klasse .clear, die ich noch in meinem Beispiel habe, ist ein Weg, ohne zusätzliches Markup zu „clearen“. Den Teil könntest du für den Anfang auch rauslassen und im HTML-Code dafür folgendes schreiben:

[html]

<img />
<img />
<img />
<img />

<div style="clear: both;"></div>
[/html]