Announcement

Collapse
No announcement yet.

Stubborn div won't align/float left

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stubborn div won't align/float left

    The main nav menu on askamiga.com has been right aligned since the latest update to Wordpress and it's themes.

    I've used the inspect-element tool to add style for left alignment the <ul> and every parent <div> above it in the cascade. I've tried attributes:
    style="text-align: left"
    as well as
    style="float: left"

    I've also examined to the best of my ability the styles inherited from elsewhere that might account for it's positioning. I'm stumped.

    Any help appreciated!

  • #2
    Looks good to me
    Have a Script or Snippet you want to share?

    WWW Standards: HTML 4.01,
    HTML 5, CSS2.1, CSS3, XHTML 1.0
    PHP Standards: PHP Standards

    Comment


    • #3
      I just floated left the class="site-header-main" and it seemed to move.

      <div style="float:left;" class="site-header-main">
      <div class="site-branding">

      <p class="site-title"><a href="http://askamiga.com/" rel="home">AskAmiga</a></p>
      <p class="site-description"></p>
      </div><!-- .site-branding -->

      <button id="menu-toggle" class="menu-toggle">Menu</button>

      <div style="text-align:left;" class="site-header-menu" id="site-header-menu">
      <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="Primary Menu">
      <div class="menu-user-container"><ul id="menu-user" class="primary-menu"><li id="menu-item-21" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-21"><a href="http://www.askamiga.com">AskAmiga</a></li>
      <li id="menu-item-59" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-59"><a href="http://askamiga.com/find-out-more-about/">FAQ</a></li>
      <li id="menu-item-34" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-34"><a href="http://askamiga.com/wp-login.php">Login</a></li>
      </ul></div> </nav><!-- .main-navigation -->

      </div><!-- .site-header-menu -->
      </div>

      Comment


      • #4
        Originally posted by fiveworlds View Post
        I just floated left the class="site-header-main" and it seemed to move.
        Right you are fiveworlds, and it's working now as you suggested. Thanks so much.

        I don't know why it only works on that class rather than the others but I'm happy to have a result!

        Comment

        Working...
        X