Results 1 to 2 of 2

Thread: navigation in header

  1. #1
    User Carolina's Avatar
    Join Date
    09-05-12.
    Location
    London
    Posts
    99

    Default navigation in header

    Hello,

    I should be able to solve this...so sorry I have to ask. I've created a module, main navigation, and placed it within the layouts, in the header. In the page it's not in the header, although i don't see why...there seems to be enough room. So I don't know why the top navigation is not within the header, like the logo, but on the right hand side. Ah, here's the site if you want to have a look: www.assembly21.com

    Thanks!
    Carolina

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,287

    Default

    <div id="logo">…</div> is a block element. That said, the element will taking up full width of the parent element. All subsequent elements are placed after the block element.

    What to do now? Absolute CSS Positioning! This tells the browser that whatever is going to be positioned should be removed from the normal flow of the document and will be placed in an exact location on the page. It is also taken out of the normal flow of the document:
    Code:
    #container, .inside {
        position: relative;
    }
    
    #logo {
        padding: 20px 0;
        widht: 260px;
    }
    
    #header .mod_navigation {
        float: right;
        font-family: Georgia;
        font-size: 16px;
        position: absolute;
        right: 0;
        top: 60px;
    }
    
    #header .mod_navigation ul {
        float: right;
        list-style-type: none;
        margin: 0;
        padding: 0;
    }
    I would suggest you to use the Contao framework and the Contao layout generator!
    Contao Community Moderator
    → Support options

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •