如何让我的readmore标签在我的CSS代码文件中以margin-top,margin-bottom和/ padding-top或padding-bottom向上移动? [英] How do I get my readmore a tags to move up with margin-top, margin-bottom and or padding-top or padding-bottom in my CSS code file?

查看:103
本文介绍了如何让我的readmore标签在我的CSS代码文件中以margin-top,margin-bottom和/ padding-top或padding-bottom向上移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将readmore按钮标签推送到我的代码中的正确位置时出现问题。比如将它们向上移动到边缘或边缘底部。



CSS代码



#individual .readmore a {

text-decoration:underline;

font-size:12px;

font-family:Lao MN;

margin-left:246px;

}



#specialized .readmore a {

margin-left:260px;

font-size:12px;

font-family:Lao MN;

text-decoration:underline; < br $>
}



#custom .readmore a {

margin-left:240px;

font-size:12px;

text-decoration:underline;

font-family:Lao MN;

}



HTML



I am having a problem pushing my readmore a button tags to their right places in my code. Such as moving them up with margin-top or margin-bottom.

CSS Code

#individual .readmore a {
text-decoration: underline;
font-size: 12px;
font-family: Lao MN;
margin-left: 246px;
}

#specialized .readmore a {
margin-left: 260px;
font-size: 12px;
font-family: Lao MN;
text-decoration: underline;
}

#custom .readmore a {
margin-left: 240px;
font-size: 12px;
text-decoration: underline;
font-family: Lao MN;
}

HTML

<p class="readmore"><a href="#">More Info</a></p>







<p class="readmore"><a href="#">More Info</a></p>







<p class="readmore"><a href="#">More Info</a></p>





我尝试了什么:



我试图使标签工作的内容如下:

保证金。

填充。

保证金顶部

保证金底部

显示:内联

显示:块

显示:内联块

仓位:相对

仓位:固定

仓位:absolute。



What I have tried:

What i have tried to make the tags work are the following:
margin.
padding.
margin-top
margin-bottom
display: inline
display: block
display: inline-block
position: relative
position: fixed
position: absolute.

推荐答案

您是否考虑过使用position:relative或position:absolute和top,以及left。您的标记应包含某种位置语句,以便其余部分可以相对于它工作。通常,< body style ='position:absolute; top:0; left:0;'>对大多数浏览器情况都相对惰性。
Have you considered using position:relative or position:absolute and top, and left. Your tag should include some sort of position statement so that the remainder can work relative to it. Commonly, <body style='position:absolute;top: 0;left: 0;'> is comparatively inert to most browser situations.


这篇关于如何让我的readmore标签在我的CSS代码文件中以margin-top,margin-bottom和/ padding-top或padding-bottom向上移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆