Grow your CSS skills. Land your dream job.

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:
    http://jeremycarlsten.zxq.net/js/hover.js

    The css:
    http://jeremycarlsten.zxq.net/css/style.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):
    http://jeremycarlsten.zxq.net/

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

    Code:
    #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^^

    thanks,
    Jerm

    :Edit:
    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.

*May or may not contain any actual "CSS" or "Tricks".