在调整大小时,div会在另一个上方射击

时间:2016-10-02 01:42:59

标签: html css

这可能是一个简单的修复,但我似乎无法弄清楚什么是错的。我删除了所有不必要的东西,所以希望代码读起来不是太糟糕。

基本上,当您向下缩放页面时,宽度方面,页脚(联系人)与其上方的div重叠。在Code Pen上已经重叠了。

HTML:

<div class="library library-row specialties">
        <div class="container">
            <div class="desc">
                <h1>Our Specialties<br/></h3>
                <p>
                    Everything we can do for you
                </p>
            </div>
            <div class="row row-images">
                <div class="col-sm-4">
                    <i class="fa fa-database" aria-hidden="true"></i>
                    <h4>Databases</h4>
                </div>
                <div class="col-sm-4">
                    <i class="fa fa-server" aria-hidden="true"></i>
                    <h4>Servers</h4>
                </div>
                <div class="col-sm-4">
                    <i class="fa fa-cloud" aria-hidden="true"></i>
                    <h4>Cloud Integration</h4>
                </div>
            </div>
        </div>
    </div>

    <div class="footer library library-row">
        <div class="container">
            <div class="accounts">
                <i>
                    <a href="#" class="fa alt fa-facebook"></a>
                    <a href="#" class="fa alt fa-twitter"></a>
                    <a href="#" class="fa alt fa-instagram"></a>
                    <a href="#" class="fa alt fa-github"></a>
                    <a href="#" class="fa alt fa-envelope"></a>
                </i>
            </div>
        </div>
    </div>

CSS :(我无法粘贴它,很抱歉,但请从Code Pen中获取)

密码笔:Click Here

再次,对不起,如果这是一个基本修复。我试过了,但我不确定它有什么问题。

1 个答案:

答案 0 :(得分:0)

有一些CSS应用于.specialties,它正在修复该div的高度。页脚位于该div下方,但.specialties div中的内容在div外部垂直溢出,因此内容呈现在页脚的下方和下方。

删除此高度:100vh; CSS,你可以看到为什么会发生这种情况。可能需要重构,如果你能解释设计意图,我很乐意帮助你。

Traceback (most recent call last):
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\david\AppData\Local\Programs\Python\Python35-32\Scripts\flask.exe\__main__.py", line 9, in <module>
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 478, in main
    cli.main(args=args, prog_name=name)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 388, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 124, in __init__
    self._load_unlocked()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 148, in _load_unlocked
    self._app = rv = self.loader()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 209, in load_app
    rv = locate_app(self.app_import_path)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 89, in locate_app
    __import__(module)
ImportError: No module named 'flaskr'

C:\Users\david\Documents\Software\Projects\Flaskr>set FLASK_APP=flaskr

C:\Users\david\Documents\Software\Projects\Flaskr>set DEBUG_MODE=1

C:\Users\david\Documents\Software\Projects\Flaskr>flask run
Traceback (most recent call last):
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\david\AppData\Local\Programs\Python\Python35-32\Scripts\flask.exe\__main__.py", line 9, in <module>
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 478, in main
    cli.main(args=args, prog_name=name)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 388, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 124, in __init__
    self._load_unlocked()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 148, in _load_unlocked
    self._app = rv = self.loader()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 209, in load_app
    rv = locate_app(self.app_import_path)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 89, in locate_app
    __import__(module)
ImportError: No module named 'flaskr'