Jump to:

22999 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » CSS Positioning - Image

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 668 Views
  • Capiz
    Avatar
    Community Member
    11 Posts

    CSS Positioning - Image Link to this post

    Hey everyone

    http://www.w3schools.com/Css/css_positioning.asp

    This tutorial, shows how to place a given TEXT, but i would like to place a Logo at a given/specific position on my site, only using CSS.
    But is it possible, i have tried inserting my "Logo" link, but it only shows my "link".

    Does anyone know how to do this - then i would be pleased

    Regards
    Rasmus

    Denmark

  • Mo
    Avatar
    Community Member
    485 Posts

    Re: CSS Positioning - Image Link to this post

    Do you mean that you want to insert an image without using an <img /> tag? If so the best option would be to use a background image on a div. If you are wondering how to do this with an image attached using an ImageField, you should look at doing something like:

    <div style="background: url($AttachedImage.URL) 0 0; width: xxxpx; height: xxxpx;"></div>

    Mo

    668 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.