css - margin-top 不移动 i 元素

标签 css position margin

我有以下 css,边距根本不起作用。这是一个 link对于实时站点,请记住它是在移动开发中,所以这就是它看起来很有趣的原因。不动的元素是推文旁边的 austin kitson

CSS

             i{
    font-size:0.6em;
    margin-top:-5px;
    margin-left: -25px;
    position:relative;
    padding-bottom:10px;
        }

html

<section class="blogPostsSection">
            <header class="blogPostsHeader">
                <?php edit_post_link('edit', '<p>', '</p>'); ?>
            <h2><?php the_date(); ?></h2>
            <h3><?php the_title(); ?></h3>
            </header>
            <?php $image = wp_get_attachment_image_src(get_field('add_images_here'), 'large');?>
             <?php if( $image !=false ) {?>
            <img src="<?php echo $image[0]; ?>" alt="<?php get_the_title(get_field('add_images_here')) ?>" />
            <?php } ?>

            <p>
            <?php the_content(); ?>
            </p>

            <a href="https://twitter.com/share" class="twitter-share-button" 
            data-text="<?php the_title(); ?>" data-via="twitterapi" data-lang="en">Tweet</a>
            <script>
            !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0];
            if(!d.getElementById(id)){
                js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";
                fjs.parentNode.insertBefore(js,fjs);
                }
            }
            (document,"script","twitter-wjs");
            </script>

            <a href="http://austin.kitson.org"><i>Austin Kitson</i></a>



        </section>

最佳答案

您没有包含您的 CSS:您所有的 CSS 和 JS 都引用 localhost。例如,http://localhost/~anderskitson/techbasics/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=3.3.3

关于css - margin-top 不移动 i 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14916751/

相关文章:

CSS Hover 和 onmouseover/out 在 Internet Explorer 中导致 15-20% 的 CPU 使用率

html - 为什么我的 div 堆叠顺序错误?

java - 隐藏屏幕上方的 ImageView/以编程方式将 y 位置设置为负值

css - 你如何强制一个无序列表和一个带有表格的 div 并排?

html - 如何将div扩展到填充中间列的任意大小的宽度?

javascript - 进行自定义布局的更好方法

android - 自定义 TextView 的边距

html - CSS 多个 ID - 并非所有 ID 都有效

css - 如何从 Linux 上的 Firefox 中的聚焦 radio 输入中删除边框/轮廓

php - 通过 PHP 发送 HTML 邮件 - 奇怪的渲染