how to override the specific style of spans in a div [span in a span ] using css or jquery?


Tags: jquery,css

Problem :

  1. if we are having div and having no of spans i.e span in a span and every span has a style of color how to override the specific style[color] using css or jquery.. . please help me


Solution :

Do you mean something like this?

<div><span style="color:red;">red <span style="color:blue;">blue</span></span></div>

If so, you can use !important to change their color:

div span {color: green !important;}

    CSS Howto..

    How to make input text bigger in bootstrap css framework?

    How do I style a different border?

    In CSS, how to create automatic section numbering only when there are multiple sections?

    How to make colspan work without affecting width of the other rows

    How to make css overlay hidden while having position as absolute

    How to use a text file's contents in HTML as text [duplicate]

    HOW TO check if an external (cross-domain) CSS file is loaded using Javascript

    CSS Dropdown menu - How to add thumbnails

    How to position the tip arrow of bootstrap popover next to a text field- CSS/Jquery

    gulp-cssmin: How to change relative URLs in minified CSS

    How can I float dynamic div's next to each other?

    How do I specify a css margin-top for foundation row div?

    WordPress: How to style Title and Excerpt in Display Post Shortcode Plugin

    How to align a menu bar using css and html? [closed]

    How to make a smooth dashed border rotation animation like 'marching ants'

    How to get better at CSS, laying out designs and UI Programming? [closed]

    How to add CSS AnimationEnd event handler to GWT widget?

    CSS: How to position a div in the center with dynamic width

    How to add TITLE and ALT to an background image (CSS Sprites)?

    How to Center-Justify links in CSS?

    How to have no border around a DIV

    How to stop an image shrinking on responsive site whilst also keeping it centred

    How to remove class using CSS

    How to properly apply a css hack for IE11 transition misbehaviour

    How can I increase input text elements' width via CSS?

    How to change color of Bootstrap warning class table row

    CSS attribute selectors: how to escape newlines within attribute value?

    How to specify multiple hover event targets in CSS?

    How To Put Values Dynamically

    HTML Imported text doesn't show line feeds correctly