如何将文本移动到页面的左侧? [英] How do I move the text to left hand side of the page?
问题描述
当我尝试移动文本时,通常的编码问题似乎没有工作,其中logo表示左侧而不是中心。我使用括号进行编码,并且正在进行编码.css
我尝试过:
这是.css部分:
.logo {
颜色:#000000;
text-align:left;
padding-left:25px;
font-size:16px;
font-weight:bold ;
}
.logo>一个{
text-decoration:none;
颜色:#000000;
}
这是.html:
http://prntscr.com/k14kgd
这是网站的外观:
http://prntscr.com/k14e96
请将链接复制并粘贴到新标签中以查看它们。
None of the usual coding problem seem to be working when I try to move a text where it says "logo" to the left instead of the centre. I use brackets for coding and am doing it on .css
What I have tried:
This is the .css part:
.logo {
color: #000000;
text-align: left;
padding-left: 25px;
font-size: 16px;
font-weight: bold;
}
.logo > a {
text-decoration: none;
color: #000000;
}
This is the .html:
http://prntscr.com/k14kgd
This is how the website looks:
http://prntscr.com/k14e96
Please copy and paste the links into a new tab to view them.
推荐答案
试试这个 -
Try this-
.logo {
color: #000000;
text-align: left;
padding-left: 25px;
font-size: 16px;
font-weight: bold;
width: 100%; /*this should do the trick.*/
}
虽然我建议你使用 Bootstrap·世界上最流行的HTML,CSS和JS库。 [ ^ ]
KR
Although I'd recommend you to use Bootstrap · The most popular HTML, CSS, and JS library in the world.[^]
KR
>
padding-left:2px;
text-align:left;
padding-left:2px;
text-align:left;
这篇关于如何将文本移动到页面的左侧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!