3 Replies - 425 Views - Last Post: 22 July 2014 - 01:08 AM

#1 web.dev.2k14  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-April 14

How to change property of a li item without affecting other items?

Posted 21 July 2014 - 08:41 PM

Hi, I'm cutting css and facing a problem. This is the screenshot of my current menu.

Attached Image

And this is what I wish my menu to look like.

Attached Image

You can have a look at the script I wrote in this link. My problem is that if I try to change the line-height, padding, margin of any of the last 2 items of the menu, other items will be affected. Please help me to solve this problem. Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: How to change property of a li item without affecting other items?

#2 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7737
  • View blog
  • Posts: 13,068
  • Joined: 19-March 11

Re: How to change property of a li item without affecting other items?

Posted 21 July 2014 - 09:05 PM

I would see this as a css problem, not a js problem. You want to get the elements in their right places to start with, not monkey around with them once they're in place.
Was This Post Helpful? 0
  • +
  • -

#3 web.dev.2k14  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 16-April 14

Re: How to change property of a li item without affecting other items?

Posted 21 July 2014 - 09:11 PM

yes that's right. I need to change the css for the last 2 menu items without affecting others.

@admin: I'm sorry I posted in the wrong forum. I posted in hurry and forgot to double check the forum's name. Please move this to css forum for me. Thanks.

This post has been edited by Dormilich: 22 July 2014 - 01:06 AM
Reason for edit:: removed previous quote

Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,226
  • Joined: 08-June 10

Re: How to change property of a li item without affecting other items?

Posted 22 July 2014 - 01:08 AM

that’s going to be difficult (though not impossible) since you have grouped items together that differ drastically in their properties.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1