The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Tumblr theme help?, Background for posts
SC2k15
post May 17 2015, 03:34 AM
Post #1





Group: Members
Posts: 2
Joined: 17-May 15
Member No.: 22,610



Hi! I've been trying to create my own tumblr theme, but I'm stuck.

I want my photo posts to have a white background while my text posts have a transparent background. Where in the HTML can I change this and how?

QUOTE

<!DOCTYPE html>
<html>
<head>

<!-- Images -->
<meta name="image:Background" content="" />
<meta name="image:Header" content="" />

<!-- Booleans -->
<meta name="ifUnderline" content="0"/>

<!-- Custom Text -->
<meta name="text:Blog title size" content="75px" />
<meta name="text:Menu text size" content="13px" />

<!-- Colors -->
<meta name="if:Black and white images" content="0" />
<meta name="color:Background" content="#FFF" />
<meta name="color:Body text" content="#FFF" />
<meta name="color:Text" content="#FFF"/>
<meta name="color:Blog title" content="#FFF" />
<meta name="color:content" content="#FFF"/>
<meta name="color:links" content="#FFF"/>

<!-- Others -->
<meta name="if:Infinite scroll" content="1" />

<title>{Title}{block:PostSummary}, {PostSummary}{/block:PostSummary}</title>
{block:Description}<meta name="description" content="{MetaDescription}" />{/block:Description}
<link rel="shortcut icon" href="{Favicon}" />
<link rel="alternate" type="application/rss+xml" href="{RSS}">

<style>
*{
margin: 0;
padding: 0;
}
body{
background:url('{image:Background}') {color:Background}; color: {color:text}; fixed center
}
a:link, a:visited{
color: {color:links};
text-decoration: {block:ifUnderline}underline{/block:ifUnderline} none;
}

#wrap{
position: relative;
margin: 110px auto;
width: 700px;
}
#content{
Background: {color:content};
width: 700px;
padding: 10px;
background: none;
margin: 20px;
}

</style>

</head>
<body>
<div id="wrap">
{block:Posts}
<div id="content">

{block:Text}

{block:Title}
<h3><a href="{Permalink}">{Title}</a></h3>
{/block:Title}{Body}

{/block:Text}
{block:Photo}
<a href="{Permalink}">
<img src="{PhotoURL-500}" alt="{PhotoAlt}" width="100%"></a>

{/block:Photo}

{block:Panorama}

{LinkOpenTag}
<img src="{PhotoURL-Panorama}" alt="{PhotoAlt}"/>
{LinkCloseTag}

{/block:Panorama}

{block:Photoset}

{Photoset-500}
{/block:Photoset}

{block:Quote}
<p><b style="font-size: 30px;">"</b>{Quote}<b style="font-size: 30px;">"</b></p>


<center>
{block:Source} - {Source}{/block:Source}
</center>
{/block:Quote}

{block:Link}
<a href="{URL}" {Target}>{Name}</a>
{/block:Link}

{block:Chat}
<h3>{Title}</h3>
<ul class="chat">
{block:Lines}
<li>
{block:Label}
{Label}
{/block:Label}
{Line}
</li>
{/block:Lines}
</ul>
{/block:Chat}

{block:Video}
{Video-500}
{block:Caption}
{Caption}
{/block:Caption}
{/block:Video}

{block:Audio}
{block:Artist}
<p>Artist: {Artist}</p>
<p>Song:{block:TrackName}{TrackName}{/block:TrackName}</p>
<p>{block:Album}Album: {Album}{/block:Album}</p>
{AudioPlayerWhite}
{/block:Artist}
{block:Caption}{Caption}{/block:Caption}
{/block:Audio}
</div>
{/block:Posts}
</div>

<script type="text/javascript">
$(function(){var $container = $('.posts').css({ opacity: 0 }); $container.imagesLoaded(function(){ $container.animate({ opacity: 1 }); $container.masonry({itemSelector:'.post',columnWidth: 410});});$container.infinitescroll({navSelector:'.pagination',nextSelector:'.pagination li a.pagination_nextlink',itemSelector: '.load',loading: {img:'http://static.tumblr.com/glziqhp/eRkls6pz6/white-90perc-opacity.png',donetext:''}},function( newElements ) { var $newElems = $( newElements ).css({ opacity: 0 });$newElems.imagesLoaded(function(){$newElems.animate({ opacity: 1 });$container.masonry( 'appended', $newElems, true );});});});
</script>
</body>
</html>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
SC2k15
post May 18 2015, 07:40 AM
Post #2





Group: Members
Posts: 2
Joined: 17-May 15
Member No.: 22,610



Figured it out 👍
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 07:25 AM