[Frage] Can't get the Menu running with CSS TYPO3-Version: 6.2.7

  • Amirnitex Amirnitex
    Typ im Roten Hemd
    0 x
    3 Beiträge
    0 Hilfreiche Beiträge
    08. 09. 2015, 09:47

    Typo3 Version 7.3.1

    Hello Community Members,

    i started a month ago with Typo3 and stopped cause i cant get any further.
    i cant get the Menu running with CSS.
    it appears always on top of the site.
    I defined in the CSS that the menu should appear between the div "header" and the div "contendFrame".
    How can i get the Menu into the div container "obj.menu"?

    Thanks in advance for your answer.

    Amirnitex

    Contend:

    TS

    1. Haupttemplate = TEMPLATE
    2. Haupttemplate {
    3. template = FILE
    4. template.file = fileadmin/Template/hauptausehen.html
    5. marks.TITLE < styles.content.getLeft
    6. marks.INHALT < styles.content.get
    7. marks.BILDR < styles.content.getRight
    8. }
    9.  
    10. page.includeCSS {
    11. file = fileadmin/Template/Stylesheet/visual.css
    12. }
    13.  
    14. ### Menü ###
    15. obj.menu = COA
    16. obj.menu {
    17. wrap = <ul>|</ul>
    18. 10 = HMENU
    19. 10 {
    20. special = list
    21. special.value = 1
    22. 1 = TMENU
    23. 1 {
    24. NO.wrapItemAndSub = <li>|</li>
    25. CUR = 1
    26. CUR.wrapItemAndSub = <li class"current">|</li>
    27. }
    28. }
    29.  
    30. 20 = HMENU
    31. 20.1 <.10.1
    32. 20.1.expAll = 1
    33. 20 {
    34. 2 = TMENU
    35. 2 {
    36. expAll = 1
    37. wrap = <ul class"level2">|</ul>
    38. NO.wrapItemAndSub = <li>|</li>
    39. ACT < .NO
    40. ACT = 1
    41. }
    42.  
    43. 3 = TMENU
    44. 3 {
    45. wrap = <ul class"level3">|</ul>
    46. NO.wrapItemAndSub = <li>|</li>
    47. ACT < .NO
    48. ACT = 1
    49. }
    50. }
    51. }
    52.  
    53. page = PAGE
    54. page.5 < obj.menu
    55. page.10 < Haupttemplate

    CSS (only part of it)

    1. #obj.menu {
    2. float: left;
    3. font-size: 14px;
    4. font-family: Arial, sans-serif;

    html

    1. <head>
    2. <link href="stylesheet/visual.css rel="stylesheet" type="text/css" />
    3. </head>
    4. <body>
    5. <div id="rahmen">
    6. <div id="header">
    7. <div class="title">
    8. Can't get the Menu running with CSS
    9. </div>
    10. </div>
    11. <div id="menu">
    12. <div id="obj.menu">
    13. </div>
    14. </div>
    15. <div id="contentFrame">
    16. <div id="spacer2">
    17. </div>
    18. <div class="bildr">
    19. ###BILDR###
    20. </div>
    21. <div id="inhalt">
    22. ###INHALT###
    23. </div>
    24. <div id="spacer">
    25. </div>
    26. </div>
    27. <div id="footer">
    28. <a href="****************" style="color:white; background-color:transparent; text-decoration:none">©</a>
    29. </div>
    30. </div>
    31. </body>
    32. <style>
    33. a:link {color:green; background-color:transparent; text-decoration:none}
    34. a:visited {color:green; background-color:transparent; text-decoration:none}
    35. a:hover {color:orange; background-color:transparent; text-decoration:underline}
    36. a:active {color:green; background-color:transparent; text-decoration:underline}
    37. </style>
    38. </html>


  • 1
  • ejoo ejoo
    R2-D2
    0 x
    95 Beiträge
    7 Hilfreiche Beiträge
    10. 09. 2015, 00:05

    Hi Amirnitex,
    you are suffering from a slight misconception: You are [b]not[/b] positioning your Menu by naming a div-id alike. As you can see in your html, there are markers like "###INHALT###". These are replaced in the Typoscript by e.g. "marks.INHALT < styles.content.get".
    Now you can do the same. First remove "page.5 < obj.menu". This ALWAYS inserts the menu before the rest of your setup! Then add under "marks.BILDR ..." a new entry "marks.MYMENU < obj.menu"; this way you tell Typo3 to replace a marker like "###MYMENU###" with your Menu. Now place this Marker in the HTML-Template inside the div: "<div id="obj.menu">###MYMENU###</div>". This is it. You can build your own Markers, like you want.

    Feedback pls,
    Dirk

  • Amirnitex Amirnitex
    Typ im Roten Hemd
    0 x
    3 Beiträge
    0 Hilfreiche Beiträge
    14. 09. 2015, 09:29

    thanks. i already solved my problem. but i took the same solution you gave me.

  • 1