 |
| Hinweise |
Willkommen im TP-Hilfe-Forum!Dies ist ein Forum zu den Themen Photoshop, Dreamweaver, Flash, Selbständigkeit und mehr, in dem Du Hilfe, Anleitung oder eine Lösung zu Deinen Problemen erhältst. Aktuell bist Du in unseren Foren als Gast mit reinen Leserechten unterwegs. Wenn Du Dich registrierst, kannst Du eigene Themen verfassen, deine Frage stellen und privat mit anderen TPlern kommunizieren. Weitere Foren werden zugänglich, und Du wirst – falls gewünscht – per Mail über neue Beiträge informiert. Die Registrierung ist schnell und kostenlos. Sollten bei der Registrierung Fragen auftauchen, reicht ein Klick in unsere Hilfe - Häufig gestellte Fragen oder eine kurze Mitteilung an das Support-Team. Viel Spaß bei Traum-Projekt.com |
04.07.2003, 12:10
|
#1
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
Bild mittig ausrichten
Hey!
Ich möchte ein Bild mittig in einem <div>-Layer ausrichten! Eigentlich hätte ich mir gedacht dass das mit vertical-align:middle; funktionieren müsste, tut es aber nicht!
Ich habs im IE6, NN7 und Opera7.11 auf Win2000 probiert, in allen wird das Bild linksbündig angezeigt!
Hier mal der betroffene CSS-Code:
Code:
.standortekarte {
background-color: #EFF3F7;
width: 100%;
vertical-align:middle;
}
.standortekartebild {
border:none;
vertical-align:middle;
}
.standortekarteheader {
background-color:#FCFDFE;
font-size: 0.7em;
color:#04314F;
padding-left:10px;
padding-top:2px;
padding-bottom:2px;
}
Hab noch ein Bild angehängt wie es jetzt aussieht (die Landkarte sollte eigentlich mittig sein)!!
lg
Flow
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
04.07.2003, 12:16
|
#2
|
|
TP-Special Mod
Registriert seit: Jun 2001
Ort: 8°21' O 49°1' N
|
Wem ordnest Du die Classes zu? Dem Bild oder dem Div?
[edit]Argh - erst genau lesen, dann antworten, Michl!
Könnte ein Zeilenumbruchproblem im Code sein - schreib die komplette DIV-Anweisung mal in eine Zeile
Geändert von webmichl (04.07.2003 um 12:22 Uhr).
|
|
|
04.07.2003, 12:32
|
#3
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
Hier mal der HTML-Code:
Code:
<div id="rechtercontainer">
<div id="rechtercontainer-innen">
<!-- Anfang Standorte Karte -->
<div class="standortekarteheader">Standorte</div>
<div class="standortekarte">
<a href="standorte.php" ><img class="standortekartebild" src="images/oesterreich.gif" alt="Landkarte mit Standorten"/></a>
</div>
<!-- Ende Standorte Karte -->
</div>
</div>
<!-- End Tag rechtercontainer -->
lg
Flow
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
04.07.2003, 12:37
|
#4
|
|
TP-Special Mod
Registriert seit: Jun 2001
Ort: 8°21' O 49°1' N
|
Versuchs mal mit
<div class="standortekarte"><a href="standorte.php" ><img class="standortekartebild" src="images/oesterreich.gif" alt="Landkarte mit Standorten"/></a></div>
machmal hilfts wirklich...
|
|
|
04.07.2003, 13:19
|
#5
|
|
TP-Specialist
Registriert seit: Aug 2002
Ort: Nähe Wien
|
mittig ausrichten =
text-align: center
betr. mittig im sinne von vertikal mittig: da ist der tag von dir an sich richtig - aber versuch mit dem container ohne fixe höhe zu arbeiten und leg das bild rein - in einen container!
gib mal die klasse für das bild weg - es reicht, wenn das unformatierte bild in einer definierte klasse liegt :-)
|
|
|
04.07.2003, 13:34
|
#6
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
Ähhh, ok 
So da ich hab jetzt die Klasse aus dem img-Tag entfernt, fixe höhe im css hab ich eh nicht!
Bis jetzt hat sich nicht viel geändert ausser das dieser besch... default-Rahmen um das Bild wieder da ist!
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
04.07.2003, 13:34
|
#7
|
|
TP-Specialist
Registriert seit: Aug 2002
Ort: Nähe Wien
|
img {
border: none;
}
|
|
|
04.07.2003, 13:38
|
#8
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
OK, darauf hätt ich jetzt auch selber drauf kommen können  !!
Das bild ist aber noch immer linksbündig!
HTML-Code:
Code:
<div id="rechtercontainer">
<div id="rechtercontainer-innen">
<!-- Anfang Standorte Karte -->
<div class="standortekarteheader">Standorte</div>
<div class="standortekarte">
<a href="standorte.php" ><img src="images/oesterreich.gif" alt="Landkarte mit Standorten"/></a>
</div>
<!-- Ende Standorte Karte -->
</div>
</div>
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
04.07.2003, 13:43
|
#9
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
Wie wars das mit CSS und Hass-Liebe !!
Momentan könnte ich das ganze Zeug durch Sonne, Mond und Sterne schiessen!
lg
Flow
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
04.07.2003, 13:44
|
#10
|
|
TP-Specialist
Registriert seit: Aug 2002
Ort: Nähe Wien
|
|
|
|
04.07.2003, 13:52
|
#11
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
04.07.2003, 13:55
|
#12
|
|
TP-Specialist
Registriert seit: Aug 2002
Ort: Nähe Wien
|
starte den html-bereich mal bitte richtig:
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
04.07.2003, 13:59
|
#13
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
Warum das jetzt schon wieder verschwunden ist frag ich mich auch! Habs eigentlich eingefügt  , naja geändert hat es aber auch nix!
lg
Flow
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
04.07.2003, 14:00
|
#14
|
|
TP-Specialist
Registriert seit: Aug 2002
Ort: Nähe Wien
|
Code:
img {
border: none;
}
img a {
border: none;
}
.standortekarte {
background-color: #EFF3F7;
width: 100%;
vertical-align:middle;
text-align: center;
}
.standortekartebild {
border:none;
vertical-align:middle;
}
.standortekarteheader {
background-color:#FCFDFE;
font-size: 0.7em;
color:#04314F;
padding-left:10px;
padding-top:2px;
padding-bottom:2px;
}
das ist mein funktionierendes style-sheet!
hast den cache schon geleert?
|
|
|
04.07.2003, 14:15
|
#15
|
|
TP-Veteran
Registriert seit: Jun 2001
Ort: Wien
|
So jetzt passts endlich!
War mein Fehler!!
Hab einen kleinen Syntax-Fehler gehabt --> mit text-aling wirds nicht funktionieren
Danke Dir!
lg
Flow
__________________
Lesser known Programming Languages #13: SLOBOL
... Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE.
|
|
|
|
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
|
|
|
| Themen-Optionen |
Thema durchsuchen |
|
|
|
| Thema bewerten |
|
|
Forumregeln
|
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.
HTML-Code ist aus.
|
|
|
Alle Zeitangaben in WEZ +2. Es ist jetzt 11:09 Uhr.
|
 |