Centering links

Forums Forums Menus Centering links

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #66
    Anonymous
    Member

    Hi Chris

    Your site looks awsome! as do your menus, Thanks for creating and sharing this, My site really needed this.. it looks soo much better now..

    I just have a question I dont know how easy it would be, but how would I move the links to the center on the nav bar as opposed to floating left?.. Im not sure which bit I need to alter and so far I had some scary results..

    Thanks again!.. Im going to add you to my credits page:)

    Martin

    #2272

    Glad to hear you like the dropdowns, but I assume you mean “Ryanâ€

    #2273
    Anonymous
    Member

    Hi Ryan..

    Doh! I must of got confused reading through the comments, sorry about that. Sorry for the late reply too I had trouble finding my original comment..

    Soo..Anyway, thanks for your reply!..

    I tried to implement the css you specified, but its just sort of stretching the background and leaving the links on the left.

    Heres my test site where Im working on it. I dont know if you might get more of an idea whats happening, perhaps something else in the css is messing things up so Im gonna go and work on it too.

    http://gf7.org/wpress/

    I just had a look at your other site from the link and thats exactly how I want my main links in the middle like that (nice site too by the way:).

    So Im gonna go and have another go, then report back..

    Thanks again

    Martin

    #2274

    Your code is totally munted. You have the [code:2w7cn5m2]< ?php function(); ?>[/code:2w7cn5m2] before your BODY tag. Move it to after the BODY tag. That still doesn’t fix the problem though.

    To center the menu correctly you need to remove the float and set a width for the containing block of 25EM’s (approx.) …

    [code:2w7cn5m2]#suckerfishnav, #suckerfishnav ul {
    float:left;
    list-style:none;
    line-height:40px;
    padding:0;
    border-bottom:1px solid #aaa;
    margin:0 auto;width:99.9%;
    }[/code:2w7cn5m2]

    should be changed to:

    [code:2w7cn5m2]#suckerfishnav, #suckerfishnav ul {
    list-style:none;
    line-height:40px;
    padding:0;
    border-bottom:1px solid #aaa;
    margin:0 auto;width:25em;
    }[/code:2w7cn5m2]

    This still leaves a problem though as the page doesn’t line up correctly. So set clear:both on #page in your CSS file.

    [code:2w7cn5m2]#page {clear:both … }[/code:2w7cn5m2]

    Let me know if that doesn’t work and I’ll take another look.

    #2275

    Hi Ryan..

    Thanks!.. I tried the fix on my local install and it seems to workm I think I can use that. Many Thanks for that. I would of probably caused chaos within the code trying to figure it out. I love the word you used “muntedâ€

    #2276
    rcarbaugh
    Member

    Ryan:
    I am a WordPress newbie trying to re-create my website with templates instead of the old html.  I really like the idea of your dropdown menus, but am having a centering problem, too.  I have gotten the menu items to line up with my 848px wide Black and Red template, by eliminating the Float command and setting the margin to 0 auto, as in your example above.  However, when I do that, the red background disappears, and I have white text on white background.  What am I doing wrong?

    http://damariscarbaugh.com/wp/
    Rod Carbaugh

    #2277

    I think if you specify a height for the wrapping tags you may find the backgroud re-appears:

    [code:3qy27wpv]#suckerfishnav, #suckerfishnav ul {height:40px}[/code:3qy27wpv]

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.