Zum Inhalt springen

Horizontales Menü zentrieren

Erstellt am 19. Februar 2008 · 7 Antworten · letzte Antwort am 21. Februar 2008

Tags: HTML & CSS, Frage

Nolis ·

Hallo hab das Problem das mein Menü (Horizontal zwar einwandfrei inkl. CSS dargestellt wird, jedoch nicht das alain center aus dem CSS wird nicht übernommen, bzw. ist wirkungslos.. woran kann das liegen ? Will eigentlich nur das Menü zentriert haben alles andere funktioniert bereits einwandfrei !

THX NOLi

just2b ·

Mit TS oder TYPO3 hat das nun aber mal genau gar nichts zu tun und ohne URL oder zumindest CSS und html usw kann und wird dir sowieso niemand helfen (können).

georg

Nolis ·

Hier mein Setup

# Configuring the Auto-Parser for main template: 
plugin.tx_automaketemplate_pi1 { 
    # Read the template file: 
  content = FILE 
  content.file = fileadmin/templates/main/demopage/index.htm
    # Here we define which elements in the HTML that 
    # should be wrapped in subpart-comments: 
  elements { 
    BODY.all = 1 
    BODY.all.subpartMarker = DOCUMENT_BODY 
    HEAD.all = 1 
    HEAD.all.subpartMarker = DOCUMENT_HEADER 
    HEAD.rmTagSections = title 
    TD.all = 1 
  } 
    # Prefix all relative paths with this value: 
  relPathPrefix = fileadmin/templates/main/demopage/
}

# Such Maschine 
tt_content.search.20.noResultObj.10.value = Leider nichts gefunden.
tt_content.search.20.next.value = Nächstes
tt_content.search.20.prev.value = Zurück
tt_content.search.20.next.value = Weiter
tt_content.search.20.target = _self
tt_content.search.30.target = _self
tt_content.search.30.dataArray.10.label = Suche nach:
tt_content.search.30.dataArray.20.label = Suche in:
tt_content.search.30.dataArray.20.valueArray.10.label = Überschriften und Schlüsselwörtern
tt_content.search.30.dataArray.20.valueArray.20.label = Seiteninhalt
tt_content.search.30.dataArray.40.value = Suche starten
tt_content.search.20.renderObj.10.typolink.target = _self
tt_content.mailform.20.target = _self

# Menu 1 cObject 
temp.menu_1 = HMENU 
  # First level menu-object, textual 
temp.menu_1.1 = TMENU
temp.menu_1.1 { 
    # Normal state properties  
  NO.allWrap = : | :
  NO.ATagParams = class="Menu"
  ACT.ATagParams = class="Menu"
    # Enable active state and set properties: 
  ACT = 1 
  ACT.allWrap = : | :
} 
  # Second level menu-object, textual 
temp.menu_1.2 = TMENU 
temp.menu_1.2 { 
    # Normal state properties 
  NO.allWrap = |  
    # Enable active state and set properties: 
  ACT = 1 
  } 
  
# Mail Form
tt_content.mailform.20.recipient >
tt_content.mailform.20.recipient = office@cupspoiler.com

# Main TEMPLATE cObject for the BODY 
temp.mainTemplate = TEMPLATE 
temp.mainTemplate { 
    # Feeding the content from the Auto-parser to the TEMPLATE cObject: 
  template =< plugin.tx_automaketemplate_pi1 
    # Select only the content between the <body>-tags 
  workOnSubpart = DOCUMENT_BODY 
  # Substitute the ###menu_1### subpart with dynamic menu: 
  subparts.menu_1 < temp.menu_1 
# Substitute the ###content### subpart with some example content:
subparts.content < styles.content.get
# Substitute the ###content### subpart with some example content:
subparts.news < styles.content.getLeft
# Substitute the ###content### subpart with some example content:
subparts.intro < styles.content.getRight
}


# Main TEMPLATE cObject for the HEAD 
temp.headTemplate = TEMPLATE 
temp.headTemplate { 
    # Feeding the content from the Auto-parser to the TEMPLATE cObject: 
  template =< plugin.tx_automaketemplate_pi1 
    # Select only the content between the <head>-tags 
  workOnSubpart = DOCUMENT_HEADER 
}

INHALT_RAND = CONTENT
                        INHALT_RAND {
                                table = tt_content
                                select {
                                        where = colPos = 1
                                        orderBy = sorting
                                        languageField = sys_language_uid
                                }
                        }

# Default PAGE object: 
page = PAGE 
page.typeNum = 0 
# Copying the content from TEMPLATE for <body>-section: 
page.10 < temp.mainTemplate 
# Copying the content from TEMPLATE for <head>-section: 
page.headerData.10  < temp.headTemplate 

plugin.tx_lzgallery_pi1._CSS_DEFAULT_STYLE >
plugin.tx_lzgallery_pi1_simple._CSS_DEFAULT_STYLE >

plugin.tx_lzgallery_pi1 {

und hier mein CSS

body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-image: url(verlauf.gif);
	background-repeat: repeat-x;
}
.Stil1 {
	font-size: 11px;
	font-family: Arial, Helvetica, sans-serif;
}
.Menu {
	font-size: 14px;
	font-weight: bold;
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
	text-align: center;
}
a.Menu:link {
	text-align: center;
	color: #FFFFFF;
	text-decoration: none;
}
a.Menu:visited {
	color: #FFFFFF;
	text-decoration: none;
	text-align: center;
}
a.Menu:hover {
	color: #FF3399;
	text-decoration: none;
	text-align: center;
}
a.Menu:active {
	color: #333333;
	text-decoration: none;
	text-align: center;
}
a:link {
	color: #333333;
}
a:visited {
	color: #333333;
}
a:hover {
	color: #66CC00;
}
a:active {
	color: #333333;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #333333;
}
h1 {
	font-size: 16px;
	color: #336699;
}
h2 {
	font-size: 14px;
	color: #336699;
}
h3 {
	font-size: 12px;
	color: #336699;
}
just2b ·

sorry, so kommen wir da nicht so weiter.

niemand wird jetzt dein TS nachbauen, schon gar nicht wenn man nicht mal weiß welcher doktype usw.

url wär immer noch am besten

Nolis ·

Das problem ist das es local am Typo Server läuft also nicht extern erreichbar ist... es muss doch einen trick geben um dieses menü einfach auf center zu setzten...

thx

Serg ·

Wenn man sich auf Typo3 stürzt, sollte halbwegs solides HTML/CSS-Wissen vorhanden sein...

Dein Problem läuft EVTL. auf ein fehlendes, umschließendes DIV um dein Menü mit CSS-Regel "margin: 0 auto 0 auto;" und fester "width:" sowie ebenso fester "width:" für das umgebende Element hinaus.
Genauer gehts von hier aus wohl nicht – und selbst das ist nur ein Schuss ins Blaue...

Für weitere Fragen hierzu wende dich besser erstmal an http://de.selfhtml.org/, http://www.css4you.de/ oder halt Google, wo du dann auch Tutorials zum Thema findest.