blogads.com adstrips use a separate CSS namespace for formatting. By default, we provide a very simple CSS for our CSS driven adstrip. However, we encourage you to customize it to your needs. This document attempts to give hints on how to control different things in our CSS driven adstrip.
| Let's start with the customization of the adstrip - the space in which the ads will reside. The CSS class "adstrip" applies for the ads' container. This example results in a white box with black borders. |
div.adspot {
border: thin solid black;
background: #ffffff;
width: 160px;
} |
|
| Ok, the previous example was too dull, so let's see a fancy one. |
div.adspot {
border: thin dotted green;
background-image: url(fall-tile.jpg);
width: 160px;
}
|
|
| Let's go ahead with the latter one. Now that we have the container, we'll format the things in it. First, there's a link "advertise here". It is controlled by the "adspot_link" CSS class. Let's make that bold, white, and appear on green background when hovered. |
.adspot_link {
font-face: Helvetica, Arial, sans-serif;
font-size: 9pt;
font-weight: bold;
text-decoration: none;
color: #ffffff;
}
a.adspot_link:hover {
background: green;
}
|
|
| Now the ads. First, the space that contains the ads within, controlled by the "div.adspot * ul" and "div.adspot * li" CSS selectors. |
div.adspot * ul {
list-style: none;
width: 150px;
margin: 0;
padding: 0;
}
div.adspot * li {
border: thin solid black;
background-image: url(semi.gif);
text-align: center;
width: 100%;
cursor: pointer;
overflow: hidden;
display: block;
}
|
|
| Then comes the ad headline, controlled by the "adspot_adhead" CSS class. |
.adspot_adhead {
text-align: center;
font-family: Times,serif;
font-size: 11pt;
font-weight: bold;
color: #000000;
}
|
|
| Now the ad image, controlled by the "a.adspot_adurl img" CSS selector. |
a.adspot_adurl img {
border: none;
margin: auto;
display: block;
}
|
|
| And the ad text, controlled by the "adspot_adtext" CSS class. |
.adspot_adtext {
font-family: Helvetica,Arial,sans-serif;
font-size: 10pt;
color: #303030;
}
|
|
| Finally the "read more" link of the ad is controlled by the "adspot_adurl" CSS class. |
a.adspot_adurl {
font-family: Helvetica,Arial,sans-serif;
font-size: 10pt;
text-decoration: none;
font-weight: bold;
color: green;
}
a.adspot_adurl:hover {
text-decoration: underline;
}
|
|
myadstrip.css, and upload that somewhere on the web. Then replace the first line of the include code provided, with<style type="text/css"> <!-- put the CSS code here --> </style>
Every adstrip has a unique identifier, which you can find out from the include code: it is that number in the url, right before "feed.js". Now, if you write "div#adspot_uniqueIdentifier " before the css selector that differs, the selector will only format that particular adstrip.
Let's see an example: you want to change the color of the ad text to orange in adspot #123456. The relevant code will look like this (in addition to the above css examples):
div#adspot_123456 .adspot_adtext { color: orange; }