0

I want add a style to a div without class and id.

<div style="position: absolute; right: 10px; top: 4px;">
<button type="button" class="close" onclick="cancelParty();">×</button>
</div>

I'm Try the next :

div.close{position:relative!important;}
div<.close{position:relative!important;}
div>.close{position:relative!important;}

and nothing.

  • This looks just completely wrong? Or is it just me? – Chris G Jan 31 '16 at 15:15
  • what issue do you have? can you to explain more clearly? – Igor Ivancha Jan 31 '16 at 15:36
  • If you are using jquery try the .parent() property. Here is more info. https://api.jquery.com/parent/. And if you are not then there is a parentElement selector in plain Javascript.. Here is more info on that one. http://www.w3schools.com/jsref/prop_node_parentelement.asp – Rahul Kate Jan 31 '16 at 15:41
  • Try `div .close` (with a space on between) or `div button.close` or just `.close` – Virtua Creative Jan 31 '16 at 15:41

0 Answers0