Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 2
Seite [1]
Fredd<y


Poststar





Beiträge: 766
# Thema - 18.11.2007 um 17:16 Uhr
Ich möchte gerne Ein Bild haben und direkt dadrunter soll ein Div stehen.
So sieht bisher der Quellcode aus:

 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
1. / 2. / ... 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Forum</title>
<
link href="trest.css" rel="stylesheet" type="text/css" />
<
style type="text/css">
<!--
.
Stil1 {
    
color#0066FF
}
-->
</
style>
</
head>

<
body>
<
img src="Unbenannt-1.gif" alt="Community" width="300" />
</
p>
<
div class="Grau_Text">
  <
p>    Test1
  
<p>    Test2</p>
  <
p>    Test3</p>
  <
p>    Test4</p>
</
div>

<
p> </p>
</
body>
</
html>


Das problem ist nur, dass es einen Abstand zwischen dem Bild und dem Div gibt.

Hier anbei nochmal mein css dafür:

.Grau_Text {
margin:0;
padding:0;
line-height: *10*px;
font-family: "Times New Roman", Times, serif;
font-size: 14px;
font-weight: lighter;
background-color: #999999;
color: #0099FF;
width: 300px;
vertical-align: top;
}

Ich dachte ich eig mit
vertical-align: top;
wäre das Problem gelöst, jedoch habe ich immer noch den Abstand. Weiß jemand vielleicht welcher Codeschnipsel noch in die css muss oder in den Div?

Mfg Mo


------------------

KBs speichern, Produktion ausrechnen, Spioberichte speichern...
Machs dir einfach!

(System for Intelligence, Cooperation and Combat)
Inaktiv
h4ze


Geekboy




Herkunft: Itzehoe
Beiträge: 1433
# Antwort: 1 - 18.11.2007 um 18:26 Uhr
[bild]
<div style='width: 300px; margin: 0 auto;'>text</div>

probier das mal...

ggf. noch padding und text-align anpassen oder so.


------------------
gembee.com - Upload your Life!
A Social Filesharing Network
"Wie YouTube, nur für alle Datei-Typen"


Inaktiv
|
ichraffsnicht ClanSphere Team

Supporter
Supporter



Herkunft: Erdeborn bei Lutherstadt Eisleben
Beiträge: 3191
# Antwort: 2 - 18.11.2007 um 19:04 Uhr
18.11.2007 um 17:16 Uhr - killahkazinski:
[quote]
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
1. / 2. / ... 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Forum</title>
<
link href="trest.css" rel="stylesheet" type="text/css" />
<
style type="text/css">
<!--
.
Stil1 {
    
color#0066FF
}
-->
</
style>
</
head>

<
body>
<
img src="Unbenannt-1.gif" alt="Community" width="300" />
</
p>
<
div class="Grau_Text">
  <
p>    Test1
  
<p>    Test2</p>
  <
p>    Test3</p>
  <
p>    Test4</p>
</
div>

<
p> </p>
</
body>
</
html>

[/quote]


als erstes mal :

[quote]
 
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
1. / 2. / ... 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<
title>Forum</title>
<
link href="trest.css" rel="stylesheet" type="text/css" />
</
head>

<
body>
<
div><img src="Unbenannt-1.gif" alt="Community" /></div>
<
div class="Grau_Text">
  <
p>    Test1</p>
  <
p>    Test2</p>
  <
p>    Test3</p>
  <
p>    Test4</p>
</
div>
</
body>
</
html>


dann mal zu deinen css:

.Grau_Text {
line-height: *10*px; /* was suchen die sterne da? */
font-family: "Times New Roman", Times, serif;
font-size: 14px;
font-weight: lighter; /* das wird ned unterstützt*/
background-color: #999999;
color: #0099FF;
width: 300px;
}


------------------



Zuletzt editiert von X-R4Y ClanSphere Team am 18.11.2007 um 19:05 Uhr (1x Editiert)
Inaktiv
|
Antworten: 2
Seite [1]


Sie müssen sich registrieren, um zu antworten.