The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Jquery negative margins lag:resolved

  • # February 20, 2010 at 7:15 pm

    Hey guys I’m working on a profile for myself and worked out what i thought was a pretty good looking horizantal navigation, I worked out the kinks in that first then i started to add in a background for the middle content that had it’s own wrapper and everything still worked fine, however i realized i wasn’t even using my pagewrap so i figured i would throw the content background into that and have a smaller div for the actual content. Once this was done my navigation was forced into the pagewrap, so i used a negative margin to position it, now magically the jquery animation is very laggy, I am very new to jquery so ill post the code and upload the page to show you what i mean.

    Just modified Chris’s link nudge snippet:

    The css:

    The page (If you click on the about button i’ve set that up to display the negative margin problem, this is the working nav):

    in the css to i changed the #nav-wrap to have a negative left margin:

    #nav-wrap { height:43px; margin: 125px auto 0px -140px; width: 140px; float: left;}

    Any help would be appreciated although for now i think ill just throw it out of the pagewrap^^


    Turns out after i setup a server on my computer to play with some php, i opened the localhost off of my dads computer and it worked just fine… For future reference ancient computers, jquery and negative margins don’t like each other for some reason^^

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed