Wednesday 26 October 2016

Displaying image for branding site

We got a common site and then branding sites, One of the site wants to show the image before a particular text and other didn't want to show that image at all.

Solution:

Update the common site to have a Div or Span and specify css class on it place this span before the text, e.g.

<span class="summaryimage"></span> Some text is shown here

now in CSS class specify

span.summaryimage{
background: url(http://url of the image) no-repeat 96% 96%;
float: left;
}


Syntax: background: <background-color> | <background-image> | <background-repeat> | <background-attachment> | <background-position>

http://www.htmlgoodies.com/beyond/css/article.php/3868361

background-color: white;
background-image: url(logo.gif);
background-position: 50% 50%;
background-repeat: no-repeat;
background-attachment: fixed;
And change it to this:
background: white url(log.gif) no-repeat fixed 50% 50%;

No comments:

Post a Comment