Answers for "css parent selector"

CSS
15

css parent selector

/* There is no such selector
   in 2008, the following was suggested */

a < img { 'border': none }

/* Which in theory, would set an an images 'a' parent
   border to none
   Of course, this does not exist

   Another suggestion... */

div:parent { 'border': none }

/* Pretty self explainatory, nevertheless it does not
   exist.

   You will have to use JavaScript/jQuery */

$('some-element').parent();
Posted by: Guest on March-19-2020
6

styles for parent of selector

Short answer: no such selector exists. Use JavaScript
Long answer: by Kaotik below
Posted by: Guest on December-08-2020
0

secltor for parent li css

//in css no way!
//but in java can use this:
$("a.active").parents('li').css("property", "value");
Posted by: Guest on November-18-2020
1

select parent of elemt

$(this).parent(); // jquery
Posted by: Guest on April-08-2020

Browse Popular Code Answers by Language