html - 删除正文和页脚之间不需要的空间

标签 html css

你好,我是 css 和 html 的新手。我需要删除正文和页脚之间的空格。有什么帮助吗? 我想在段落的同一行添加图像

<!DOCTYPE html>
<html lang="en">
<head>
<title>Neotic</title>

</head>

<body> 
<div>
<center><img src="{{STATIC_URL}}Neoticlogo.png" height="200" width="400"  alt="Logo"  ></center>

<center> <font face="Arial" size="14.18" color=" #587974" >Beat the markets with AI </font></center>

</div>
</br>
</br>
<div class='row' style="background: #3CB371" >
<div class="col-lg-4">

<p style=" color:#EDEDED; font-family: Arial; font-size:+9; padding-left: 90px; width:400px" align="justify"> Neotic is a trading support platform, that allows traders to test trading strategies and provides related trading recommendations leveraging artificial intelligence, without writing a single line of code.</p> 


 </br>
  <p style=" color:#EDEDED; font-family: Arial; font-size:+9; padding-left: 90px; width:400px" align="justify"> The artificial intelligence is based on a machine learning algorithm that incorporates corporate fundamentals, historical prices and financial news</p> 

 <b> <p style=" color:#EDEDED; font-family: Arial; font-size:+10; padding-left: 90px; width:400px" align="justify"> We are upgrading our services and revamping our brand</p> </b>


</div>

  <div class="well">
   <center> <p class="text-muted" style="color:#EDEDED; font-family: Arial; font-size:+2" >©2017 Neotic. All rights reserved </p> </center>
</div>
</footer>


</body>

Image

最佳答案

好的。所有的拳头...请提供您所有的代码并使用最新的 HTML5 代码...

使用您提供的编写糟糕的代码,我制作了一个 JSFiddle .

<div class="well">
   <center> <p class="text-muted" style="color:#EDEDED; font-family: Arial; font-size:+2" >©2017 Neotic. All rights reserved </p> </center>
</div>
</footer>

div同类well有一个谁知道什么的高度,所以当我将背景颜色和高度设置为 20px 时,我得到的结果就像你的图片一样。

PS:我删除了过时的中心标签并添加了一个 text-align:;到div样式。我还修复了你的 </br>不正确的标签并将它们重置为 <br/> .我还添加了缺少的起始元素,如 <footer>因为 </footer>在你的代码中。感谢 James 和 j08691 指出 <font>标签也已过时。我修复了你的代码,但下次请检查你的 HTML 是否有过时的标签。

<title>Neotic</title>
<body> 
<div>
<img src="{{STATIC_URL}}Neoticlogo.png" height="200" width="400"  alt="Logo" style>

<h1 style="text-align: center;">
<font face="Arial" size="14.18" color=" #587974">Beat the markets with AI </font>
</h1>

</div>
<br/>
<br/>
<div class='row' style="background: #3CB371" >
<div class="col-lg-4">
<p style=" color:#EDEDED; font-family: Arial; font-size:+9; padding-left: 90px; width:400px" align="justify"> Neotic is a trading support platform, that allows traders to test trading strategies and provides related trading recommendations leveraging artificial intelligence, without writing a single line of code.</p> 
 <br/>
  <p style=" color:#EDEDED; font-family: Arial; font-size:+9; padding-left: 90px; width:400px" align="justify"> The artificial intelligence is based on a machine learning algorithm that incorporates corporate fundamentals, historical prices and financial news</p> 
 <b> <p style=" color:#EDEDED; font-family: Arial; font-size:+10; padding-left: 90px; width:400px" align="justify"> We are upgrading our services and revamping our brand</p> </b>
</div>
<footer>
 <div style="background-color:#333; height:20px;">
 <p style="font-family: Arial; font-size:+2; text-align:center;color:#fff;" >©2017 Neotic. All rights reserved </p>
</div>
</footer>

关于html - 删除正文和页脚之间不需要的空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44811228/

相关文章:

java - JSF 数据表不显示任何数据

jquery - 所有信息(包括图片)在一行中使用 CSS 删除线

javascript - 使用 knitr 在 R 中为 html 创建条件格式化表

html - 网页上表单的重叠布局

javascript - 如何动态更改字体大小以使其始终适合其父容器

css - Reactjs webpack 配置问题

javascript - SVG viewbox 可以在 HTML Canvas 中吗?

css - 移动浏览器在较小的屏幕尺寸(移动设备)上显示 768px+ 的断点样式

javascript - 缩小 document.getElementsByClassName 的范围是否会带来切实的性能优势?

javascript - Digg 如何从其搜索结果 URL 中删除 "&x=0&y=0"?