How to change img style inside span in CSS?


Tags: html,css

Problem :

I need a quick help:

I have a CSS like this:

#ranking li span.awa
{ 
    //Something
}

And HTML like this:

             <span class=\"awa\"> 
                <div >
                    <a href=''>
                      <img src=''>
                    </a>
                </div>
              </span>

Now i don't know what is the name of img and can not put class type to img tag. I need to set in CSS that img inside span of class awa should have border: 0px; How to do this?

In para langauge i need this:

#ranking li span.awa.img
{ 
    border: 0px;
}

But it does not work. How to write this properly?



Solution :

Use a space, just like you've used twice. A space means "somewhere inside":

#ranking li span.awa img
{ 
    border-style: none;
}

span.awa.img, my the way, means a span with two classes: <span class="awa img">.


    CSS Howto..

    How to override previous onClick css class change (jQuery)

    css code how to change active navigation button color

    How to select the first paragraph in a div with a specific class (CSS 2)

    How to wrap entire line with overline and underline , until the end of the line ?

    CSS - how to make content fit to the width/height of paragraph?

    How to load user CSS in a WebKit WebView using PyObjC?

    How to point to CSS default class using the class attribute

    How to overlay image with color in CSS?

    How to make irregular CSS border

    How will I change CSS based on classes and id using jQuery

    How to remove/add jQueryUI CSS theme from specific element?

    How can I use CSS transitions to animate a responsive layout's vertical orientation?

    How to go about making an image move up in the div on hover

    How to calculate padding-top in % of the given div relative to its parent div

    How do I make a paragraph of text display as a square/rectangle in CSS

    How to prevent CSS3 transform from make elements unclickable

    How to hide element label by element id in CSS?

    How to make text “Passed” and progress bar appear in line in smaller views?

    How do I remove the white line under the nav bar

    How to change text from black to white upon hover on background black?

    How to vertically align lists when one li is a div

    How to create a underline with small break in middle with css?

    Greasemonkey: How to do something when style=“display: none;” changes?

    How to customize Twitter Bootstrap from Illustrator design

    How not to display / filter out special characters? (CSS or Javascript)

    How to hide child element entirely if it is cut off by it's parent's overflow:hidden property?

    Javascript - How to alter a property of a css class

    How to simplify my CSS stylesheet?

    how to apply css on only one class?

    How to center multiple divs inside a container in CSS