Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8075905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:09:04+00:00 2026-06-05T15:09:04+00:00

Is there a way to return a CSS element? I was using Adobe Edge

  • 0

Is there a way to return a CSS element?

I was using Adobe Edge and adding some of my own code in their code tab, but in order to create boundaries I would need to keep track of margin-top or margin-left. The following code works to move the element “woo” but I’m not sure how to call the elements to add something like “|| sym.$(“woo”).css({“margin-left”>0px”}) to the move left code.

//Move RIGHT
if (e.which == 39) {
   sym.$("woo").css({"margin-left":"+=10px"});
}
//Move UP
else if (e.which == 38) {
    sym.$("woo").css({"margin-top":"-=10px"});
}
//Move Left
else if (e.which == 37) {
    sym.$("woo").css({"margin-left":"-=10px"});
}
//Move DOWN
else if (e.which == 40) {
    sym.$("woo").css({"margin-top":"+=10px"});
}

EDIT:

I changed the Left if statement to the following:

else if (e.which == 37 && ($("woo").css("margin-left")>0)) {

It seems to be working to some extent except for now it won’t move left at all! I tried doing <0 too in case I was screwing up a sign but it won’t let me move the element left either.

ANSWER:

Well it turns out that the syntax of returning values is a little different than i thought. To return the left margin instead of using the dash like how i used to set it, I had to do as below.

sym.$("woo").css('marginLeft')

And then to actual make it an int and compare it I used this.

if(parseInt(sym.$("woo").css('marginTop'))>0)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:09:04+00:00Added an answer on June 5, 2026 at 3:09 pm

    Well it turns out that the syntax of returning values is a little different than i thought. To return the left margin instead of using the dash like how i used to set it, I had to do as below.

    sym.$("woo").css('marginLeft')
    

    And then to actual make it an int and compare it I used this.

    if(parseInt(sym.$("woo").css('marginTop'))>0)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to return a random row from a table using LINQToSQL?
Is there a way to get the code below to return null if no
Is there any way to return the height of an element that is already
Is there a css parser within js? like F(#a) will return me the element
Is there a better way of writing this code: http://jsfiddle.net/2u7fg/2/ $('img').filter(function() { return $(this).attr('align').length
Is there any way to return an array from a function? More specifically, I've
Is there a way to return a point for a string within a text
Is there a way to return a new version of an array/hash that does
Is there a (simple) way to return the amount of elements colliding with a
I would like to know if there is any way to return an char

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.