Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

reactjs - Responsive Footer Design in Reactstrap

I'm having trouble with the responsive design of a footer with reactstrap. Given below is the code snippet for the footer.

const Styles=styled.div`
    .navbar{
        background-color: black;
        width: 100%;
    }
`;
const Column = styled.div`
        display: flex;
        flex-direction: column;
        margin: 10px 30px auto 30px;
`;
const Line = styled.hr`
    border: solid 1px grey;
    width: 700px`;

const Footer = () =>{
    return(
            <Styles>
                <Navbar className="navbar-fixed-bottom">
                    <Container className="justify-content-center">
                        <Row> 
                           . 
                           .
                           .
                        </Row>
                        <Row><Line/></Row>
                    </Container>
                    <Container className="justify-content-center"><Row><HeadingList>? CEC CSE Department</HeadingList></Row></Container>
                </Navbar>
            </Styles>
    )
}

The above code works fine if there's enough content to fit the page. But if there is not, then the below problem occurs

enter image description here

As it's evident from the picture, there's so much white space below the footer. How can I solve this issue? I've tried overriding the CSS position to sticky with bottom 0, but it creates problem when there's more than enough content to fit the page.

Some other responsive solutions are much appreciated.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...