Hallo liebe xhtmler,
kann mir jemand helfen? Ich möchte gerne Div im Div zentrieren.
Um genau zu sein möchte ich, dass der Inhalt von: themenumrandungzentriert mittig dargestellt wird. Könnt ihr mir bitte helfen?
Es funktioniert aber nicht
HTML-Code:
.themenumrandung{float:left; width:302px;}
.themenumrandungzentriert{margin-top: 0;width:302px;}
.themaumrandung{float:left; padding-top:10px; padding-left:6px; padding-right:2px;cursor:pointer;}
.themalinks1{ width:8px; height:22px; float:left; background-image:url(../_img/navi-thema1-1.jpg); float:left;}
.themarechts1{ width:8px; height:22px; float:left; background-image:url(../_img/navi-thema1-3.jpg); float:left;}
.themamitte1{ height:21px; background-image:url(../_img/navi-thema1-2.jpg); float:left; padding-left:3px; padding-right:4px; padding-top:1px;}
HTML-Code:
<div class="themenumrandung"><div class="themenumrandungzentriert">
<div onClick="window.location.href='#'" class="themaumrandung">
<div id="1" onMouseOver="swap_bg('1', '2', '3');" onMouseOut="swap_bg_back('1', '2', '3');" class="themalinks1"></div>
<div id="2" onMouseOver="swap_bg('1', '2', '3');" onMouseOut="swap_bg_back('1', '2', '3');" class="themamitte1"><a class="thema" href="#">Sex</a></div>
<div id="3" onMouseOver="swap_bg('1', '2', '3');" onMouseOut="swap_bg_back('1', '2', '3');" class="themarechts1"></div>
</div>
<div onClick="window.location.href='#'" class="themaumrandung">
<div id="4" onMouseOver="swap_bg('4', '5', '6');" onMouseOut="swap_bg_back('4', '5', '6');" class="themalinks1"></div>
<div id="5" onMouseOver="swap_bg('4', '5', '6');" onMouseOut="swap_bg_back('4', '5', '6');" class="themamitte1"><a class="thema" href="#">Schwangerschaft</a></div>
<div id="6" onMouseOver="swap_bg('4', '5', '6');" onMouseOut="swap_bg_back('4', '5', '6');" class="themarechts1"></div>
</div>
</div></div>