fishi
14. Juli 2008 um 19:26
1
Hi,
Hab ein Problem:
<html>
<head>
<style type="text/css">
<!--
.menue {
font-family: Arial;
font-size: 14px;
text-decoration: none;
color: #000000;
text-align: center;
background-image: url(normal.png);
width: 80px;
height: 30px;
display: block;
}
.menue:hover {
font-family: Arial;
font-size: 14px;
text-decoration: none;
color: #000000;
text-align: center;
background-image: url(hover.png);
width: 80px;
height: 30px;
display: block;
}
-->
</style>
</head>
<body bgcolor="#000000">
<table cellpadding="1" cellspacing="0">
<tr>
<td><a class="menue" href="#" title="">TEST</a></td>
</tr>
</table>
</body>
</html>
Nun der neu code:
<html>
<head>
<style type="text/css">
<!--
body {
margin: 0px;
padding: 0px;
background-image: url(background.png);
}
.menue {
font-family: Arial;
font-size: 14px;
text-decoration: none;
color: #000000;
text-align: center;
background-image: url(normal.png);
width: 80px;
height: 30px;
display: block;
}
.menue:hover {
font-family: Arial;
font-size: 14px;
text-decoration: none;
color: #000000;
text-align: center;
background-image: url(hover.png);
width: 80px;
height: 30px;
display: block;
}
-->
</style>
</head>
<body>
<table cellpadding="1" cellspacing="0">
<tr>
<td><a class="menue" href="#" title="">TEST</a></td>
<td><a class="menue" href="#" title="">TEST</a></td>
</tr>
</table>
</body>
</html>
Nun im FF2.0.0.15 ist das “TEST” ganz oben und zentriert aber es sollte zentriert und von unten(bottom) aus gerichtet sein …£dit: also unten am Rand "kleben"
Wie bring ich das hin ? Hab schon viel versucht !
MfG fish
Versuche mal “bottom:0;” oder “vertical-align:bottom;” einzugeben.
wenn du nur Text im .menu hast, musst du nur vertical-align: bottom für .menu verwenden, blockelemente bringst du mit margin-top: auto für das blockelement ganz nach unten
fishi
14. Juli 2008 um 19:41
4
Ne … bottom:0; hab ich schon versucht… vertical-align:bottom; geht nicht …
Du musst “position:absolute;” und “bottom:0px;” eingeben.
fishi
14. Juli 2008 um 19:51
7
dan klebt es unten beim Browser … aber der text in der Tabelle muss ganz unten sein … und zentriert …
Notfals musst du das eingeben:
vertical-align:baseline;
left:50%;
Anders bekomme ich es komischerweise auch nicht hin. Da muss ein kleiner Flüchtigkeitsfehler sein.
Das muss aber stehen bleiben.
fishi
14. Juli 2008 um 20:13
9
[quote=“sumatra70”]Notfals musst du das eingeben:
vertical-align:baseline;
left:50%;
Anders bekomme ich es komischerweise auch nicht hin. Da muss ein kleiner Flüchtigkeitsfehler sein.[/quote]
lol…vielleicht füg ich faltsch ein…wie fügst es ein ? bei css oder ,oder wie ?
[code]
[/code]
hummer
14. Juli 2008 um 20:20
11
Du hast das sowieso komisch aufgebaut. Wenn du das schon im “a” tag eingebaut hast, kannst du ruhig “a:hover” nehmen. Ich versuche es mal anders aufzubauen.
fishi
14. Juli 2008 um 20:36
14
Das 1 Ist das was bei mir kommt das 2 ist das was ich meine …(Mit Paint gemacht ne !)
Zumindest ist es so richtig geschrieben:
[code]
<!--
body {
margin: 0px;
padding: 0px;
background-image: url(background.png);
}
#bla
{position:absolute;
text-align: center;
bottom:0px;
padding:1px;
vertical-align:baseline;
top:auto;
}
#bla td a {
font-family: Arial;
font-size: 14px;
text-decoration: none;
color: #000000;
text-align: center;
background-image: url(normal.png);
width: 80px;
height: 30px;
display: block;
}
#bla td a:hover {
font-family: Arial;
font-size: 14px;
text-decoration: none;
color: #000000 ;
background-image: url(hover.png);
width: 80px;
height: 30px;
display: block;
}
–>
[/code]
Jetzt muss nur noch die Horizontale Ausrichtung stimmen.
fishi
14. Juli 2008 um 20:48
16
@sumatra70 :
Ich meine nicht von Browser steht ja oben /.… Thx für die mühe …
fishi
14. Juli 2008 um 20:55
18
sumatra70:
[size=200]Häää[/size]
Ich habs mit Paint gemacht (Das 2te )
So müsste es stimmen. Sonst weiß ich auch nicht mehr weiter.
[code]
<!--
body {
margin: 0px;
padding: 0px;
background-image: url(background.png);
}
#bla
{position:absolute;
text-align: center;
bottom:0px;
padding:1px;
vertical-align:baseline;
top:auto;
left:40%;
}
#bla td a {
font-family: Arial;
font-size: 14px;
text-decoration: none;
color: #000000;
text-align: center;
background-image: url(normal.png);
width: 80px;
height: 30px;
display: block;
}
#bla td a:hover {
text-decoration: none;
background-image: url(hover.png);
display: block;
}
–>
[/code]