Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

CSS Positioning - Image


Go to End


2 Posts   1208 Views

Avatar
Capiz

Community Member, 11 Posts

21 March 2010 at 5:39am

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

Avatar
Mo

Community Member, 541 Posts

22 March 2010 at 11:46am

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