Skip to content

Instantly share code, notes, and snippets.

@martindrapeau
Last active October 8, 2017 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martindrapeau/ef53b4d6fa7c1d7092cdb7352638b194 to your computer and use it in GitHub Desktop.
Save martindrapeau/ef53b4d6fa7c1d7092cdb7352638b194 to your computer and use it in GitHub Desktop.
Carbon ads CSS - Responsive bottom-right fixed position
@media (min-width: 992px) {
#carbonads {
position: fixed;
right: 0;
bottom: 0;
box-sizing: border-box;
float: right;
background-color: rgba(0,0,0, 0.1);
padding: 1.5rem;
width: 32rem;
text-align: left !important;
margin: 0;
min-height: 1.3rem;
z-index: 1000;
border-top-left-radius: 10px;
}
#carbonads .carbon-img {
float: left;
width: 14.5rem;
}
#carbonads .carbon-poweredby {
margin-top: 1rem;
display: block;
}
}
@martindrapeau
Copy link
Author

martindrapeau commented Oct 8, 2017

On desktop and landscape tablet (992px and above), the carbon ad is fixed bottom right. On smaller screens, original CSS is maintainted. Preview here on CSVJSON.
Derived from an existing gist by blivesta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment