• Sorry can’t even express what I want…
    I have some entries in the css that start

    .flag {
    	width: 16px;
    	height: 11px;
    	background:url(flags.png) no-repeat
    }
    
    .flag.flag-ad {background-position: -16px 0}
    .flag.flag-ae {background-position: -32px 0}

    how do I call them from html? Say I want to display .flag.flag-ad

    help…

Viewing 8 replies - 1 through 8 (of 8 total)
  • They’ll display as plain text if they aren’t wrapped in <style> tags.

    Thread Starter qim

    (@qim)

    could you tell me what i have to put in the html for the flag to appear, please?

    The “.” refers to a class in css, i.e. <div class="flag">

    .flag will now target that div.

    Thread Starter qim

    (@qim)

    I’m sorry to go on but I’m a bit lost here. I have put the css stuff in the css file and there images which are in the server. How do I access those images? I must refer to the file where the images are and so far there is nothing and I don’t know how to do it.

    can you help?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    How do I access those images?

    Use the <img> tag.

    Thread Starter qim

    (@qim)

    So:

    <div class=”flag”>
    <img src=”flags/ad.png>
    </div>

    something like this?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yes, but use a full path to the image;

    <img src="/wp-content/themes/yourTheme/flags/ad.png">

    Thread Starter qim

    (@qim)

    Thanks again

    i got the little image in the page. great!!! Now, for the next problem: there are over 200 of them. Do I have to bring thm in one at a time or can I devise a coimmand to bring them all together?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘html from css’ is closed to new replies.