简体   繁体   English

我不知道这段代码有什么问题

[英]I can't figure out what is wrong with this code

This code gives me: image of broken layout I just want the p tag class .mailtext to be inside the footer and not outside as it does.这段代码给了我:损坏布局的图像我只希望p标记类.mailtext位于页脚内部,而不是像它那样位于外部。

I don't know if this counts as you doing my homework but this is driving me crazy the last two days.我不知道这是否算作你在做我的作业,但这在过去两天让我发疯。 The first p tag (the copyright text) works perfectly, but the second one is not.第一个p标签(版权文本)工作正常,但第二个不是。 I have tried a lot of different solutions.我尝试了很多不同的解决方案。 I have come up with solutions such as changing the overflow , z-index , making div container bigger, but nothing worked.我想出了解决方案,例如更改overflowz-index ,使div容器更大,但没有任何效果。 I am a student and not experienced.我是学生,没有经验。 Any ideas?有任何想法吗?

 .footer { /* more info footer */ height: 200px; background-color: black; margin-top: 80px; position: absolute; right: 0; left: 0; overflow: hidden; } .rights { /* copyright paragraph */ text-align: center; color: white; margin-top: 170px; } .mail { /* mail icon properties */ position: relative; bottom: 140px; left: 377px; } .mailtext { /* my email text properties */ position: relative; color: red; } .feedback { /* feedback icon properties */ position: relative; bottom: 190px; left: 430px; }
 <footer class="footer"> <div class="moreinfo"> <!-- more info footer --> <p class="rights">&#169;2017 annu.com. All rights reserved.</p> <!-- copyright symbol --> <a target="_blank" href=""> <img class="feedback" src=""> </a> <!-- feedback logo --> <img class="mail" src=""> <!-- mail logo --> <p class="mailtext">aaaaaa@gmail.com</p> </div> </footer> <!-- /Footer -->

.rights has a large margin-top on it. .rights有一个很大的margin-top This makes it start near the bottom of the footer.这使它从页脚底部附近开始。

The paragraph after it, appears after it, below the footer (and off the screen).它之后的段落出现在它之后,在页脚下方(并在屏幕外)。

You need to leave enough space (whether by increasing the height of the footer, using a minimum instead of fixed height, using a smaller margin on the paragraph, or some other means) for your content to appear in.您需要留出足够的空间(无论是通过增加页脚的高度,使用最小高度而不是固定高度,在段落上使用较小的边距,还是其他方式)让您的内容出现。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我无法弄清楚我的html代码出了什么问题 - I can't figure out what is wrong with my html code 无法弄清楚我在这个加密 web 应用程序中做错了什么。 为什么要更改错误的字母? - Can't figure out what I did wrong in this encryption web app. Why it is changing the wrong letters? 你好。 我正在尝试将此代码居中,但它没有居中。 我不知道我做错了什么 - Hi! I am trying to center this code but it is not centering. I can not figure out what I did wrong 出于某种原因,当我将它添加到我的代码中时,我收到了意外的文件结尾错误。 但我无法弄清楚这段代码有什么问题 - For some reason when i add this to my code I get the unexpected end of file error. But I can't figure out what's wrong with this code 做个西蒙游戏,不知道哪里错了 - Making a Simon Game, can't figure out what is wrong 无法弄清楚我的语法出了什么问题 - Can't figure out what's wrong with my syntax 无法找出我在用这个php条件做错了什么 - Can't figure out what I'm doing wrong with this php conditional 我无法弄清楚我的 HTML 和 jQuery 执行有什么问题 - I can't figure out what is wrong with my HTML and jQuery impementation 有人可以请我弄清楚我在 jQuery 中做错了什么,以便在我尝试打开我的模态时得到这个“找不到变量:$”代码? - Could someone please me figure out what I am doing wrong in jQuery in order to get this "Can't find Variable: $" code whenI try and open my modal? 我似乎无法弄清楚我做错了什么,我的 hover 无法在我的网站上运行 - I can't seem to figure out what I did wrong that my hover isn't working on my website
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM