Topic
  • 6 replies
  • Latest Post - ‏2009-12-15T12:58:47Z by SystemAdmin
pathi_ice
pathi_ice
11 Posts

Pinned topic Image Component in Style sheet

‏2008-08-15T15:55:15Z |
We have image components in WCM and it's being referred from style sheet. The problem is the images are not showing up. I have tried to keep the image as both Image/File resource component and referenced it in my style as
#star li.curr { BACKGROUND: url('<Component name="Stars"/>') left 25px; FONT-SIZE: 1px; }.
This style sheet code goes in the HTML component which I am referring to in Presentation template. I have also tried to use HTML element in authoring template and insert the same code.
Nothing seemed to solve the problem. Please let me know if I am missing something. I have Portal 6.0.1.3
Updated on 2009-12-15T12:58:47Z at 2009-12-15T12:58:47Z by SystemAdmin
  • ramo
    ramo
    17 Posts

    Re: Image Component in Style sheet

    ‏2008-08-17T07:26:42Z  
    Hi. The following may help:
    1) remove the "25px" from the CSS background definition. Seems like wrong syntax.
    2) why is the font size defined to be so small (1px)?
    3) regarding WCM, if you're using an image component, you'll need to add a format attribute to the component tag: <Component name="Stars" format="url"/>. If you're using a file-resource component, this is unnecessary.
  • ContentChemist
    ContentChemist
    13 Posts

    Re: Image Component in Style sheet

    ‏2008-08-19T08:57:35Z  
    we also use an HTML component with all the CSS, and put it in the head of the presentation template. WCM will then go through the HTML component and fill in the details for the components (image or file resource).

    however, i don't think you need the single quotes around the component tag - perhaps that's why it's not working.

    
    <style type=
    "text/css"> <!--   .line2 
    { height: 1px; background: url(<Component name=
    "library/component_name"/>) 0 50% repeat-x; padding: 10px 0; 
    }   --> </style>
    
  • pathi_ice
    pathi_ice
    11 Posts

    Re: Image Component in Style sheet

    ‏2008-08-19T12:53:04Z  
    Thanks all for your time! I could get it work!!
  • sowji
    sowji
    3 Posts

    Re: Image Component in Style sheet

    ‏2009-12-15T11:23:01Z  
    • pathi_ice
    • ‏2008-08-19T12:53:04Z
    Thanks all for your time! I could get it work!!
    Hi,
    I am facing problem here... My images in CSS are not getting referred .
    can u help me .
  • SystemAdmin
    SystemAdmin
    3918 Posts

    Re: Image Component in Style sheet

    ‏2009-12-15T12:57:08Z  
    • sowji
    • ‏2009-12-15T11:23:01Z
    Hi,
    I am facing problem here... My images in CSS are not getting referred .
    can u help me .
    Hi,

    Referring image in CSS:

    *<style type="text/css"?
    body{
    background-image:url(<Component name="background" format="url"/>):
    }
    </style>*

    Regards,
    Kishore
    http://www.kishorewcm.com
  • SystemAdmin
    SystemAdmin
    3918 Posts

    Re: Image Component in Style sheet

    ‏2009-12-15T12:58:47Z  
    Hi,

    Referring image in CSS:

    *<style type="text/css"?
    body{
    background-image:url(<Component name="background" format="url"/>):
    }
    </style>*

    Regards,
    Kishore
    http://www.kishorewcm.com
    Hi,

    Referring image in CSS:

    
    <style type=
    "text/css"> body
    { background-image:url(<Component name=
    "background" format=
    "url"/>): 
    } </style>
    


    Regards,
    Kishore
    http://www.kishorewcm.com