简体   繁体   English

html / css的页脚格式和间距问题

[英]Footer formatting and spacing issues with html/css

I've been passed on a rather dated website, which to be honest is a bit of a mess. 我已经通过了一个过时的网站,说实话,这有点混乱。 So at the moment I'm basically just trying to do the basics, which is challenging! 因此,目前我基本上只是在尝试基础知识,这具有挑战性!

Web page in question is here http://www.yourchesham.co.uk/online.htm 有问题的网页在这里http://www.yourchesham.co.uk/online.htm

I'm attempting to add historic versions of the magazines under the 我正在尝试在“

Previous Editions 

section, but I don't appear to be able to move the bottom content down the page, meaning that overtime the text is going to start overlapping. 部分,但我似乎无法将底部内容移至页面下,这意味着超时文字将开始重叠。

I've tried simply using <br><br> to push the page content down, but this is not working. 我试过简单地使用<br><br>将页面内容下推,但这是行不通的。 The main block of code is shown below. 主要代码块如下所示。 Not sure how to address this? 不确定如何解决?

        <div id="apDiv19">
            <div align="center" class="style21">
                <h4>Support the Businesses <br />
                    that support <span class="style17">yourAmersham</span></h4>
                </div>
            </div>
            <div id="apDiv22">Registered in 'England and Wales' Company number 08280869</div>
            <div id="apDiv23">
                <h4>Our Latest Edition</h4>
                <div style="text-align:center;"><div style="margin:8px 0px 4px;"><a href="http://www.calameo.com/books/0052756020d65a0443ab5" target="_blank">Your Amersham Issue 51 October 2017</a></div><iframe src="//v.calameo.com/?bkcode=0052756020d65a0443ab5&mode=mini" width="480" height="300" frameborder="0" scrolling="no" allowtransparency allowfullscreen style="margin:0 auto;"></iframe><div style="margin:4px 0px 8px;"><a href="http://www.calameo.com/" target="_blank">Read more publications on Calaméo</a></div></div>

                <h4>Previous Editions</h4>
                <a href="http://en.calameo.com/read/00527560211169822a565" target="_blank">September Issue</a><br>
                <a href="" target="_blank">August Issue</a>
                <br>    <br>

                <!--        <div style="background-color: #333333; width: 524px"> -->

    </div>

The problem isn't just with that div, its actually pretty much all of them :) 问题不仅仅在于那个div,实际上几乎所有的都是:)

All of the divs have been given a fixed height and absolute positioning. 所有的div都具有固定的高度和绝对的位置。 This means they won't move and or grow (although the content will overflow of the div as you've seen). 这意味着它们不会移动或增长(尽管内容会像您看到的那样溢出div)。

To make the layout move and grow with the content,you will need to change everything from absolute positioning to relative positioning. 为了使布局随内容移动和增长,您需要将所有内容从绝对位置更改为相对位置。

Alternatively, if you can target the css in that page only, you could just update the absolute positions of the bottom divs to move them out of the way of your new content 另外,如果您只能在该页面中定位CSS,则只需更新底部div的绝对位置即可将其移出新内容

  1. Change the height of #apDiv14 (ie the one with the latest editions, assuming this is the one you are adding the previous editions to) to height:auto; #apDiv14的高度更改为height: #apDiv14 (即,使用最新版本的高度,假设这是您要向其添加先前版本的height:auto;height:auto;
  2. manually change the top value of the following divs to suit the new content you add: #apDiv7 , #apDiv9 , apDiv10 , apDiv18 , apDiv19 (and possibly others!) 手动更改top以下的div的价值,以适应你添加新的内容: #apDiv7#apDiv9apDiv10apDiv18apDiv19 (!可能还有其他人)

It's messy, but then so is the site itself! 这很麻烦,但网站本身也是如此! :) :)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM