crofthunter
New member
moinmoin,
suche mal rat bezüglich optimierung eines css snippets
und zwar möchte ich valide content mittig mittig zentrieren
hab 2 varianten
1. Variante:
#horizon {
* background-color : #ddd;
* color : #000;
* position : absolute;
* top : 50%;
* left : 0;
* width : 100%;
* margin-top : -252px;
* text-align : center;
* min-width : 760px;
}
#absolutemiddle {
* background-color : #ddd;
* color : #000;
* position : relative;
* text-align : left;
* width : 760px;
* height : 504px;
* margin : 0 auto;
}
2te Variante:
#horizon{
color: #000;
background-color: #ddd;
text-align: center;
position: absolute;
top: 50%;
left: 0px;
width: 100%;
height: 1px;
overflow: visible;
visibility: visible;
display: block
}
#absolutemiddle{
background-color: transparent;
margin-left: -380px;
position: absolute;
top: -252px;
left: 50%;
* width : 760px;
* height : 504px;
visibility: visible;
}
HTML:
<div id="horizon">
<div id="absolutemiddle">
Content
</div>
</div>
Problem der ersten Variante:
im Opera 5-6 klebt der Conten unten am Brauserrand
Problem der 2ten Variaten im NS6 sind in der oberen Hälfte etwaige Link verdeckt und nicht anklickbar
Hat jemand da nen FIX?
Lieben Gruß
suche mal rat bezüglich optimierung eines css snippets
und zwar möchte ich valide content mittig mittig zentrieren
hab 2 varianten
1. Variante:
#horizon {
* background-color : #ddd;
* color : #000;
* position : absolute;
* top : 50%;
* left : 0;
* width : 100%;
* margin-top : -252px;
* text-align : center;
* min-width : 760px;
}
#absolutemiddle {
* background-color : #ddd;
* color : #000;
* position : relative;
* text-align : left;
* width : 760px;
* height : 504px;
* margin : 0 auto;
}
2te Variante:
#horizon{
color: #000;
background-color: #ddd;
text-align: center;
position: absolute;
top: 50%;
left: 0px;
width: 100%;
height: 1px;
overflow: visible;
visibility: visible;
display: block
}
#absolutemiddle{
background-color: transparent;
margin-left: -380px;
position: absolute;
top: -252px;
left: 50%;
* width : 760px;
* height : 504px;
visibility: visible;
}
HTML:
<div id="horizon">
<div id="absolutemiddle">
Content
</div>
</div>
Problem der ersten Variante:
im Opera 5-6 klebt der Conten unten am Brauserrand
Problem der 2ten Variaten im NS6 sind in der oberen Hälfte etwaige Link verdeckt und nicht anklickbar
Hat jemand da nen FIX?
Lieben Gruß