troubleshooting Question

Change div position when checkbox is checked/unchecked

Avatar of James_Avery
James_Avery asked on
CSSJavaScriptHTML
8 Comments1 Solution753 ViewsLast Modified:
I have a checkbox on my page with a unique id of 'myCheckboxName'.  I have a div further down the page that is absolutely positioned, with a div id of 'myDiv'. I need to adjust the 'left' position from '649px' to '598px' of 'myDiv' depending on if the checkbox is checked or not.

checked = left: 598px
unchecked = left: 649px

I need to do the same with a dropdown menu with an id of 'myDropdown'.  If a specific option is selected in the menu, it should change the position of 'myDiv' to a specified absolute position.

Any ideas?
ASKER CERTIFIED SOLUTION
Eduardo Ciciliato

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros