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 8926705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:02:22+00:00 2026-06-15T08:02:22+00:00

I am highlighting a div using ui-state-highlight on mouseover and also indenting it on

  • 0

I am highlighting a div using ui-state-highlight on mouseover and also indenting it on mouse click event. The div is highlighted perfectly when it is not indented but once it is indented highlight still is according to the div’s previous position. The highlighted/indented div is a Sortable element. I understand this has probably something do with the CSS but am a noob at that!

Code;

<style>
      .ui-state-highlight {border: 4px solid #ffffa1;}
      .indent { margin: 0; padding-left: 10px; }
</style>

On Mouse Click;

if ($('#'+(parseInt(pushpin._text))).prop('class') == "indent ui-state-highlight" || $('#'+(parseInt(pushpin._text))).prop('class') == "ui-state-highlight indent"){  
    $('#'+(parseInt(pushpin._text))).removeClass("indent"); 
}
else{
    $('#'+(parseInt(pushpin._text))).addClass("indent");
}

On Mouseover

$('#'+(parseInt(pushpin._text))).addClass("ui-state-highlight")
  • 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-15T08:02:23+00:00Added an answer on June 15, 2026 at 8:02 am

    Try with margin-left instead of padding-left.

    Padding is the space between the content and the border of the element. What you want is to “move” the element to the right.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The CSS syntax highlighting in vim is not entirely optimal. For example: div.special_class stops
I'm working on highlighting a small scripting language (that is not a derivative of
A popular editor uses highlighting to help programmers avoid using C++ keywords in Java.
I'm working on highlighting a repeater row when i click anywhere on that row.
I want to modify the solution for highlighting trailing whitespace described here by NOT
I'm using Prettify for syntax highlighting, but it doesn't work on dynamically generated code.
I'm using the following code to allow users to resize a DIV element vertically,
I am trying to prevent text highlighting in Firefox for some, but not all
I have a <div> with a bunch of text in it. This <div> also
I'd like to do text highlighting by hovering a div behind the text via

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.