Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
a powerful frown
Jan 31, 2005

I'm running an old javascript menu I had lying around my computer for years. I wanted the script centered, so modified it to include a margin-left and changed its absolute position which works fine in chrome, opera, IE but breaks in firefox which puts the menu on the far left of the screen

thoughts?

unfortunately, using a div container won't work either

Adbot
ADBOT LOVES YOU

a powerful frown
Jan 31, 2005

Lumpy posted:

Guys, something is wrong with my car engine, it's sort of making this noise... I put a clamp on that thing, but now the other hose is lose: what should I do to fix it?

hahahahaha

:(

but it has cross browser opacity.

a powerful frown
Jan 31, 2005

Nigglypuff posted:

I think Lumpy means to suggest you treat us to a glimpse at the source code.

wait, for real?

I was going to do that originally but its like 1600 lines >_> I already wrote an alternative PEACE OUT

a powerful frown
Jan 31, 2005

I have another small question, I have a javascript element loading on a page. right now it is calculating where the element loads like this:
code:
var left=($(window).width()-(m1.offsetx-$(document).scrollLeft())>m1.actualwidth)? m1.offsetx : m1.offsetx-m1.actualwidth+m1.anchorwidth
which, well, works... but if the window gets resized it isn't in the right position (which sucks). is there any easy way to use the "50%-#px" as one would center in CSS with JS? basically what I want is something that dynamically centers at an offset

edit: copied the code calculating the y offset by accident!

a powerful frown fucked around with this message at 03:36 on Aug 23, 2009

a powerful frown
Jan 31, 2005

that sounded like a good idea but a lot of work so instead of doing that I just added a style to the css and got the JS to call that for its draw function! except it still only takes either the left: or margin-left:, not both. is there any way to fix that?

a powerful frown fucked around with this message at 04:09 on Aug 24, 2009

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply