Nonresponsive footer

1

Iammakingaresponsivewebsystemusingsomebootstrapelements.Thewholesystemisresponsiveexceptforthefooterwhich,inadditiontoleavingthefixedpositionatthebottomofthescreen,stilldecreasesthesize.

Hereisthehtmlandcsscodeforthefooter:

<footer class="footer">
            <div class="container">
                <span class="text-muted" style="
                    position: absolute;
                    bottom: 0;
                    width: 120%;
                    height: 60px;
                    line-height: 60px;
                    background-color: #222222;
                    margin-left: -214px;
                    text-align: center;">
                    <font>
                        <font> Desenvolvido por ****** - *****</font>
                    </font>
                </span>
            </div>
        </footer> 

Note: HTML and CSS are together to avoid headaches.

    
asked by anonymous 13.07.2017 / 15:08

3 answers

1

Good morning Mariana, so from what I understood from your code you want a responsive and fixed footer at the end of the correct page? try putting the style properties: width: 100%, height: 60px, position: fixed; all in the footer tag.

    
13.07.2017 / 16:00
1

I took the absolute position, the margin, gave a width: 100% and added a float left, so it stays responsive on any device:

       <footer class="footer">
            <div class="container">
                <span class="text-muted" style="
                    width: 100%;
                    height: 60px;
                    line-height: 60px;
                    background-color: #222222;
                    text-align: center;
                    float: left;
                    ">
                    <font>
                        <font> Desenvolvido por ****** - *****</font>
                    </font>
                </span>
            </div>
        </footer>
    
13.07.2017 / 16:56
0

I was able to solve the problem.

<footer class="footer" style="
        position: fixed;
        width: 100%;
        height:60px;">
        <div class="container-flex rodape">
            <span class="text-muted" style="
                position: fixed;
                bottom: 0;
                width: 120%;
                height: 60px;
                line-height: 60px;
                background-color: #222222;
                margin-left: -214px;
                text-align: center;">
                <font>
                    <font> Desenvolvido por ****** - *******</font>
                </font>
            </span>
        </div>
    </footer>

I just changed Absolute to fixed in position style within span.

    
13.07.2017 / 16:39