将页脚注释(标签和日期)移动到帖子的右侧,就像在另一列中一样

时间:2015-08-21 17:32:11

标签: html css

我正在玩我的主题,似乎我使用的两个主要栏目浮动定位,所以我无法绕过制作一个“新栏目”将笔记放在帖子的右侧。 正是我需要的是在图片中显示的大致空间内仅设置右上方每个帖子的音符。 我真的很感谢帮助我们了解最新情况。

参考图片:

enter image description here

TUMBLR的网址:http://est-fug.tumblr.com

和HTML:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>

    <!--
        Reboot by justin.waggonerphoto.com

        Inspired by justplaintheme.tumblr.com.
    -->

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>{Title}</title>
{block:Description}<meta name="description" content="{MetaDescription}" />

{/block:Description}
    <!-- custom  -->
    <meta name="text:Disqus shortname" content="" />

    <meta name="if:Show People I Follow" content="0">
    <meta name="if:Show Timestamp" content="1">
    <meta name="if:Show Date" content="1">
    <meta name="if:Show Search" content="1">

    <meta name="font:Body" content="Calibri">
    <meta name="color:Background" content="#FFFFFF"/>
    <meta name="color:Text" content="#111111"/>
    <meta name="color:Link Text Hover" content="#FFFFFF"/>
    <meta name="color:Link Background Hover" content="#111111"/>

    <meta name="if:Show post notes" content="1">
    <meta name="if:Endless scrolling" content="0">

    <!-- custom -->
    <style type="text/css">
        body {
            margin: 0;
            padding: 20px;
            background: #FFFFFF;
            font-family: Calibri, Helvetica, sans-serif;
            font-size: 15px;
            color: #000000;
        }
.navi {
                color: {color:Text};
                position: fixed;

            }

        a {
            color: #797979;
            text-decoration: none;
        }

            a:hover {
                color: #000000;
            }

            a img { border-width: 0px;

            }

        .clear {
            clear: both;
        }

        #container {
          width: 770px;
        }

        hr {
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: .5em 0;
    padding: 0; 
}

        #left {
                        float: left;

                        Padding-left:25px;
            width: 200px;
        }

        #left a.h2 {
            text-transform: uppercase;
            font-size: 2em;
            line-height: 1em;
            color: {color:Text};
            text-decoration: none;
        }

            #left a.h2:hover {
                color: {color:Text};
                background: none;
                text-decoration: none;
            }

 }
            }

        #left .space {
            width: 100%;
            height: 20px;
        }

            #left .space.small {
                width: 100%;
                height: 10px;
            }


        #right {
            width: 500px;
            float: right;
        }

            #right .post {
                margin: 0 0 100px 0;
            }

            #right .post img {
              max-width: 500px;
            }

            #right .post h3 {
                font-weight: normal;
                font-size: 1.5em;
                margin: 0;
            }

            #right .post a.h3 {
                color: {color:Text};
                text-decoration: none;
                font-size: 1.5em;
                margin: 0;
            }

                #right .post a.h3:hover {
                    background: none;
                }

            #right .post a.h3.link {
                text-decoration: underline;
            }

                #right .post a.h3.link:hover {
                    color: {color:Link Text Hover};
                    background: {color:Link Background Hover};
                }

            #right .post blockquote {
                border-left: 2px solid {color:Text};
                padding: 0 0 0 15px;
                margin-left: 0px;
            }

            /* this is for chat */
            #right .post table {
                margin: 10px 0 0 0;
                border-collapse: collapse;
            }

                #right .post table tr {
                    margin: 1px 0;
                }

                #right .post table tr td {
                    padding: auto;
                    vertical-align: top;
                }

                #right .post table tr td.name {
                    text-align: right;
                    padding: 1px 15px;
                }

                #right .post table tr td.words {
                    width: 100%;
                    text-align: left;
                    padding: 1px;
                }
            /* that was for chat */
            #notecontainer{
                float:left;
            }

            ol.notes {
          margin: 0 0 50px 0px;
          padding: 0 0 0 0;
      }

          ol.notes img {
              display: none;
          }

        #right #footer {
            position: relative;
            right: 0px;
            text-align: right;
        }

            #right #footer .credit {
                color: #797979;
                margin: 50px 0 0 0;
            }

                #right #footer .credit a {color: #797979;}
                #right #footer .credit a:hover {color: {color:Text}; 

background: none; }

    a.install {
        width: 96px;
        height: 20px;
        background: url(http://static.tumblr.com/thpaaos/dHHkt0jor/install_theme.png);
        display: block;
        position: absolute;
        top: 26px;
        right: 3px;
    }
    {CustomCSS}



    </style>

    {block:IfEndlessScrolling}
  {block:IndexPage}
  <script type="text/javascript" 

src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
  <script type="text/javascript" 

src="http://static.tumblr.com/thpaaos/sZQkv2j7g/infinitescroll.js"></script>
  <script type="text/javascript">
  var jQis = jQuery.noConflict();
  jQis(function($){
      // Infinite Scroll plugin
      // copyright: Paul Irish &amp; dirkhaim
      // license: cc-wrapped GPL : http://creativecommons.org/licenses/GPL/2.0/
      $('ul.allposts').infinitescroll({
          debug           : false,
          nextSelector    : "a.next",
          text            : "",
          donetext        : "{lang:No more posts}.",
          navSelector     : "div#footer",
          contentSelector : "div#right",
          itemSelector    : "div#right > .post"
      });
  });
  </script>
  {/block:IndexPage}
  {/block:IfEndlessScrolling}

    <link rel="shortcut icon" href="{Favicon}">
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}" />
    <meta name="viewport" content="width=820" />
</head>
<body>
<a href="http://www.tumblr.com/theme/15290" class="install"></a>
<div id="container">
<div class="navi">
  <div id="left">

    <a href="/" class="h2"><img src="https://38.media.tumblr.com/avatar_d3907ead3e72_128.png" width="100px" alt="Elisabeth Smith a.k.a. Estrella Fugaz"></a>
<br>

{block:Description}{Description}{/block:Description}
    {block:HasPages}
</br>
<hr>
        {block:Pages}<b></b> <a href="{URL}">{Label}</a><br/>{/block:Pages}

    {/block:HasPages}
<hr>

    {block:AskEnabled}<div class="space"></div><b></b> <a href="/ask">{AskLabel}</a><br/>{/block:AskEnabled}
    {block:SubmissionsEnabled}→ <a href="/submit">{SubmitLabel}</a>

{/block:SubmissionsEnabled}
  <hr style="padding-bottom:10px;">

  <a href="https://www.behance.net/elisabethsmith" imageanchor="1" style="margin-left: 0em; margin-right: 10px; margin-top: 20px;"><img border="0" src="http://3.bp.blogspot.com/-3C1MEDjJq1w/VdZdGgR6w_I/AAAAAAAAAuI/KE1tTxiA8gQ/s1600/behance.gif" /></a>
   <a href="https://www.flickr.com/photos/129111321@N05/" imageanchor="1" style="margin-left: 0em; margin-right: 10px; margin-top: 20px;"><img border="0" src="http://3.bp.blogspot.com/-pM3aiuiY1Xo/VdZdG7rVuHI/AAAAAAAAAuY/tuO1z3lZ-vQ/s1600/flickr.gif" /></a>
    <a href="https://www.facebook.com/e.fugaz.s" imageanchor="1" style="margin-left: 0em; margin-right: 10px; margin-top: 20px;"><img border="0" src="http://2.bp.blogspot.com/-0GZC94m-NWs/VdZfiGLZnGI/AAAAAAAAAu4/ZGONAw3VpqQ/s1600/fb.gif" /></a>


    {block:IfShowPeopleIFollow}
        {block:Following}
        <p style="text-transform:uppercase;">{lang:Following}:</p>
        {block:Followed}→<a href="{FollowedURL}">{FollowedTitle}</a><br />

{/block:Followed} 
        {/block:Following}
    {/block:IfShowPeopleIFollow}
    {block:IfShowSearch}
    <hr>

    <div class="space"></div>
    <form action="/search" method="get">
        <input type="text" class="search-query" name="q" value="{SearchQuery}" 

/> <input type="submit" class="search-button" value="{lang:Search}"/>
    </form>
    {/block:IfShowSearch}
  </div>
  </div>

  <div id="right">
    {block:Posts}
    <div class="post">
    {block:Text}
        {block:Title}<a href="{Permalink}" class="h3">{Title}</a>{/block:Title}
        {Body}
    {/block:Text}

    {block:Link}
        <a href="{URL}" class="h3 link">{Name}</a>
        <p>{block:Description}{Description}{/block:Description}</p>
    {block:Link}

    {block:Photo}
        {LinkOpenTag}<img src="{PhotoURL-500}" alt="{PhotoAlt}">{LinkCloseTag}
        <p>{block:Caption}{Caption}{/block:Caption}</p>
    {/block:Photo}

    {block:Quote}
        <h3>&#8220;{Quote}&#8221;</h3>
        <p>{block:Source}&mdash; {Source}{/block:Source}</p>
    {/block:Quote}

    {block:Chat}
        {block:Title}<a href="#" class="h3">{Title}</a>{/block:Title}
        <table>
            {block:Lines}
            <tr>
                {block:Label}<td class="name">{Label}</td>{block:Label}
                <td class="words">{Line}</td>
            </tr>
            {/block:Lines}
        </table>
    {/block:Chat}

    {block:Audio}
        {AudioPlayerBlack}
        {block:Caption}{Caption}{/block:Caption}
    {/block:Audio}

    {block:Video}
        {Video-500}
        {block:Caption}{Caption}{/block:Caption}
    {/block:Video}
        <p>&nbsp;<a href="{Permalink}"> <font color="#FF0000">☞</font> 

{block:Tags}
<a id="tags" href="{TagURL}">·{Tag}</a>
{/block:Tags}
        {block:Date}{block:IfShowTimestamp}

{12Hour}:{Minutes}&nbsp;{AmPm}&nbsp;&nbsp;{/block:IfShowTimestamp}<font color="#000000">|</font>{block:IfShowDate}

&nbsp;&nbsp;{Month}&nbsp;{DayOfMonth}&nbsp;{Year}{/block:IfShowDate}{block:Date}

{block:IfShowPostNotes}{block:NoteCount}&nbsp;&nbsp;<font color="#000000">|</font>&nbsp;&nbsp;{NoteCountWithLabel}

{/block:NoteCount}{/block:IfShowPostNotes}{block:Date}{block:IfDisqusShortname}

&nbsp;&nbsp;<font color="#000000">|</font>&nbsp;&nbsp;<a href="{Permalink}#disqus_thread" style="text-

transform:lowercase;">{lang:View comments}</a>{/block:IfDisqusShortname}</a>

{/block:Date}&nbsp;</p>

    </div>

    {block:IfDisqusShortname}
    {block:Permalink}
    <div class="notecontainer" style="padding: 0 0 50px 0;">
      <div id="disqus_thread"></div>
      <script type="text/javascript" src="http://disqus.com/forums/{text:Disqus 

Shortname}/embed.js"></script>
      <noscript><a href="http://{text:Disqus Shortname}.disqus.com/?url=ref">{lang:View 

the discussion thread}</a></noscript>
    </div>
    {/block:Permalink}
    {/block:IfDisqusShortname}

    {block:IfShowPostNotes}{PostNotes}{/block:IfShowPostNotes}
    {/block:Posts}
    <div id="footer">
        {block:Pagination}
            {block:PreviousPage}
                <a href="{PreviousPage}">{lang:Previous}</a>
            {/block:PreviousPage}

            {block:JumpPagination length="10"}
                {block:CurrentPage}
                    <span class="current_page">{PageNumber}</span>
                {/block:CurrentPage}

                {block:JumpPage}
                    <a class="jump_page" href="{URL}">{PageNumber}</a>
                {/block:JumpPage}
            {/block:JumpPagination}

            {block:NextPage}
                <a href="{NextPage}" class="next">{lang:Next}</a>
            {/block:NextPage}
        {/block:Pagination}
        {block:PermalinkPagination}
            {block:NextPost}
            <a href="{NextPost}">{lang:Back}</a>
            {/block:NextPost}
            &nbsp; | &nbsp;
            {block:PreviousPost} 
            <a href="{PreviousPost}">{lang:Next}</a>
            {/block:PreviousPost}
        {/block:PermalinkPagination}
        <div class="credit">
            <a href="http://justin.waggonerphoto.com">twentyten</a> by <a 

href="http://www.waggonerphoto.com">Justin Waggoner</a><br />
            </div>
    </div>
  </div>
<div class="clear"></div>
</div>
{block:IfDisqusShortname}
<script type="text/javascript">
//<![CDATA[
(function() {
  var links = document.getElementsByTagName('a');
  var query = '?';
  for(var i = 0; i < links.length; i++) {
    if(links[i].href.indexOf('#disqus_thread') >= 0) {
      query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
    }
  }
  document.write('<script charset="utf-8" type="text/javascript" 

src="http://disqus.com/forums/{text:Disqus Shortname}/get_num_replies.js' + query + 

'"></' + 'script>');
  })();
  //]]>
  </script>
{/block:IfDisqusShortname}
</body>
</html>

1 个答案:

答案 0 :(得分:0)

试试这个:

.notes {
  position: absolute;
  top: 0;
  right: -150px;
  width: 150px; // set the width as you need, I just put 150px as an example
}

并添加&#34;职位:亲属&#34;到你的&#39; .post&#39;因为.notes不会在整个页面上浮动。