help with CSS-targeting a “home” button…

  • Author
    Posts
  • #428421

    Hi,

    I am customizing the sandbox 1.6.1 theme and since it has no home button I followed this advice on how to “create” one (https://en.forums.wordpress.com/topic/can-i-add-home-to-my-sandbox-navigation-bar?replies=25).

    But as you can see if you look on my blog the home button (which is called “BLOGG”) is not positioned nicely with the rest of the menu.

    I am trying to target the item with CSS to move it up a bit, but I have no success.

    Does anyone know how I could target the item? Its HTML is :
    <div id=”menu”>

      <li class=”page_item page-item-74″><a href=”http://ecureuilaulaboratoire.wordpress.com/blogg/”……… I think it is the space between the “page_item page-item-74” that makes it difficult….

    Thanks a lot!

    The blog I need help with is ecureuilaulaboratoire.wordpress.com.

    #428765

    devblog
    Member

    try this:

    #menu{overflow: hidden;}
    
    #menu .page-item-74 a {margin-top: -3px;}

    The first definition makes sure nothing bleeds out the menu area… the second one, adjusts the position of the item so that it’s aligned with the others.

    HTH

    #428783

    Thanks a lot!

    #428787

    I just ran in to this and my solution was simple. I just added a new page called “Home” and changed the shortlink to “index-php”. It shows up inline with the rest of the page navigation and does what I wanted it to do: redirect to the main home page. Give it a try.

    #428789

    unmallya
    Member

    @elizabethcarroll,

    As far as I know at wordpress.com we don’t have access to index.php. We can only modify CSS style sheet that to if you have purchased the CSS upgrade.

    #428793

    I’m on WordPress.com too, check out my main site http://www.thinkliz.com. It’s got a Home link even though I’m on Sandbox 1.6.1. I just added a new page, named it “Home”, then left the content blank and made the “slug” (called slug in quick-edit) “index-php”. So I’m not actually accessing any php or HTML, just creating a blank page and by having that slug, WordPress knows to forward to the home page. Give it a try and hopefully you’ll see what I’m talking about.

    #428795

    devblog
    Member

    elizabethcarroll,

    Very cool tip. Thanks for sharing.

    #428796

    timethief
    Member

    Bookmarking! :)

    #428797

    Me too!

    (Got to add it in my page-tabs-as-external-links post!)

    #428800

    unmallya
    Member

    I thought you are talking about making changes to underlying codes. Impressive and very cool tip. I will try this. Thanks for sharing

    #428801

    ban750
    Member

    @elizabethcaroll,

    You have designed very impressive sandbox skin.

    Nice tip to create a home page. I was looking for this solution for long time, Now I will use this tip on my blog.

    thanks for sharing!

    #428809

    @elizabethcaroll,

    YES! what a beautiful trick…

    I was having super problems aligning the home button because I styled my menu with background images (to fake tabs) and the home button tricks available before your solution did not work with background images and padding on the because there was some weird double element being created with part of the home button linking to the index.php and another part of the button linking to the “home” page (i.e. a subpage to the blogg called “home” because “home” is what we wrote when we created the page). I was super weird but now I don’t have to grind my teeth anymore…

    #428815

    Hi elizabethcarroll! I’m veering off a little bit, but I took a look at your blog and I really like how the background stays put while the rest of the page scrolls. That would be the best solution for the blog I’m designing right now. Can you tell me how you did that? – Thanks!

    #428822

    susanhobbs
    Member

    @elizabethcarroll you’re awesome! Thanks for the tip. It’s exactly what I was looking for.

The topic ‘help with CSS-targeting a “home” button…’ is closed to new replies.