XHTMLforum

XHTMLforum (http://xhtmlforum.de/index.php)
-   CSS (http://xhtmlforum.de/forumdisplay.php?f=73)
-   -   DIVS nebeneinander -> border-bottom läuft in anderes DIV, Text aber nicht. (http://xhtmlforum.de/showthread.php?t=64752)

plegox 24.05.2011 16:02

DIVS nebeneinander -> border-bottom läuft in anderes DIV, Text aber nicht.
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo,

ich habe ein Problem:
Ich möchte ein 2-spaltiges DIV Element basteln. Im linken DIV ein Foto darstellen und im rechten DIV eine Überschrift + Text. Für jedes Element habe ich nun ein eigenes DIV vorgesehen (Container, Foto, Überschrift, weiterer Text).
Das klappt soweit auch ganz gut (siehe angehängtes Foto), bis auf eine Sache:
Unter der Überschrift möchte ich eine Linie anzeigen lassen (mit border-bottom). Aber die Linie läuft immer in das linke DIV des Fotos hinein - die Linie soll aber direkt unter dem ersten Buchstaben der Überschrift beginnen. Was mache ich falsch?

DANKE,
viele Grüße



HTML-Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
        <meta name="author" content="Stefan" />

        <title>Untitled 2</title>
</head>

<body>

<div style="font-size:16px;font-weight:bold;width:390px;float:left;overflow:hidden;">
        <div style="width:110px;float:left;margin-right:10px;"><a href=''><img class="" src="http://www.dvse-kongress.de/dvse2010/bilder/iphone_dvse_transparent.jpg" alt = ""/></a></div>
        <div style="width:280px;border-bottom: 1px solid #9e00a6; ">Hallo </div>
        <div style="">Willkommen auf meiner Seite!</div>
</div>
<div style="clear:both;"></div>

</body>
</html>


Chris2011 24.05.2011 16:50

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
        <meta name="author" content="Stefan" />

        <title>Untitled 2</title>
</head>

<body>

<div style="font-size:16px;font-weight:bold;width:390px;float:left;overflow:hidden;">
        <div style="width:90px;float:left;margin-right:10px;"><a href='#'><img class="" src="http://www.dvse-kongress.de/dvse2010/bilder/iphone_dvse_transparent.jpg" alt = ""/></a></div>
        <div style="width:auto;border-bottom: 1px solid #9e00a6; margin-left:120px; ">Hallo </div>
        <div style="margin-left:120px">Willkommen auf meiner Seite!</div>
</div>
<div style="clear:both;"></div>

</body>
</html>


plegox 24.05.2011 16:57

Danke
 
Ich Danke Dir :)


Alle Zeitangaben in WEZ +2. Es ist jetzt 07:55 Uhr.

Powered by vBulletin® Version 3.8.11 (Deutsch)
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

© Dirk H. 2003 - 2023