facebook

How to refer to an image with css styles

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #349541 Reply

    I have a custom css file and I have this class:

    li.iipad {
    padding: 0 0 0px 30px;
    margin: 0 0 10px 0;
    line-height: 1.5em;
    color: #3e3e3e;
    font-weight: normal;
    background: url('res/images/bullet1.png') no-repeat left center;

    From the simulator debug I have a lad resource error.
    How can I refer to an image with css in order to load correctly in simulator and any real device too ?
    Thanks in advance

    #349553 Reply

    Hi eudosia,

    Have you tried adding as an additional project file your image?

    #349557 Reply

    I have copied directly the image here
    www/res/images/bullet1.png
    and linked into css file.
    but In the simulator I have a load resource failure because I have an url like
    http://127.0.0.1:9090/get/weuihfdsjnfweiufnsd/res/images/bullet1.png
    Starting from assertion I hadded my image to addictional project file list then
    wich is the src url I have to specify into css class ?
    Thanks in advance

    #349572 Reply

    Code_A
    Member

    Can I ask exactly you are wanting to accomplish by editing the css file? Personally, I would try to avoid this route if possible because I don’t like messing with css. Instead I would recommend either using the image widget and link the file directly to it, or use javascript to draw the image on an html canvas. Would either of these options wok better for you?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: How to refer to an image with css styles

You must be logged in to post in the forum log in