k0rki1985

CSS Inhalt in Tabelle mittig darstellen

Hallo Leute,

ich habe ein Problem unzwar möchte ich in einer Tabelle ( 1 Zelle , 1 Spalte ) einen CSS Inhalt (Drop Down Menü) mittig darstellen, wie krieg ich das hin ?
Hier mein bereits fertiger Quelltext:

<body onLoad="enableDropdownMenuForIE();">  
<table  border="0" width="800" height="125" align="center" background="Bilder/banner.gif">  
  <tr>
    <td width="100%" height="100%" align="center" valign="middle">  
      <ul class="dropdown" id="mainmenu">  
        <li><a href="#">.news</a>  
            <ul>

was jetzt folgt is der HTML - Code fürs Dropdownmenue

hier die CSS Anweisungen:

<style>

body 
{
	font-family:"Comic Sans MS"; 
	font-size: 9px;
	position: relative;
	text-transform: uppercase;
	right: auto;
	left: inherit;
	vertical-align: text-bottom;
	display: inline-table;
}

ul.dropdown a
{
	background-color:#f0f0f0;
	color:#000000;
	padding:4px;
	text-decoration:none;
	background-image: url(Bilder/Menue.JPG);
}

ul.dropdown a:hover
{
    background-color:#444;
    color:#fff;
}

ul.dropdown ul
{
    border:1px outset;

}

ul.dropdown ul a
{
    background-color:#ccc;
    color:#000;
    padding:4px;
    text-decoration:none;
}

ul.dropdown ul a:hover
{
    background-color:#f0f0f0;
    color:#000;
}

ul.dropdown ul li
{
    background-color:#ccc;
}
</style>
Auf Facebook teilen
Auf X (Twitter) teilen
Auf Reddit teilen
Auf Linkedin teilen

Content-ID: 66451

Url: https://administrator.de/forum/css-inhalt-in-tabelle-mittig-darstellen-66451.html

Ausgedruckt am: 18.05.2025 um 07:05 Uhr

taco
taco 24.09.2007 um 11:08:14 Uhr
Goto Top
hi k0rki

also ich bin mir nicht ganz sicher ob es das ist was du suchst aber

table
{
	text-align:center;
}

das is der befehl um den Inhalt eines Elements auszurichten.

mfg taco

ps. wenn css dann auch so viel wie möglich css um die übersicht zu behalten und kein misch masch aus html und css formatierung