Адаптивная полноэкранная навигация с элементами / иконками - PullRequest
0 голосов
/ 29 октября 2019

Я пытаюсь сделать эту полноэкранную адаптивную навигацию.

того, чего я пытаюсь достичь

Однако, когда я пытаюсь закодировать это, я могу 'по какой-то причине. Я работаю с Bootstrap 4 и пытался работать со строками / столбцами, но это не сработало. Моя база сейчас выглядит следующим образом.

То, что у меня есть сейчас

  1. Одна проблема в том, что я не знаю, как выровнять значки в следующемдруг к другу в той же строке, что и contact / faq.
  2. Кроме того, я хотел бы сделать навигацию отзывчивой, поэтому я хочу убедиться, что соотношение элементов практически одинаково на каждом экране, но как это сделать?

Это мой HTML:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <link rel="stylesheet" href="css/stylesheet.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
        <title>Our Story</title> 
    </head>

    <header class="container-fluid fixed-top p-0">
        <nav class="navbar navbar-light">
            <button class="navbar-toggler align-items-center" type="button" data-toggle="collapse" data-target="#navDropdownMenu" aria-controls="navbarDropdownToggle" aria-expanded="false" aria-label="Toggle navigation">
                <i class="fa fa-bars"></i>
            </button>

            <a class="navbar-brand mx-auto p-0" href="index.html">FORRESTR</a>

            <button class="shoppingCart navbar-toggler" type="button">
                <i class="fa fa-shopping-cart"></i>
            </button>

            <div class="collapse navbar-collapse" id="navDropdownMenu">
                <div class="navbarCollapse">
                    <ul class="navbar-nav">
                        <a class="nav-item nav-link" href="index.html">Products</a>
                        <a class="nav-item nav-link active" href="ourstory.html">Our Story</a>
                        <a class="nav-item nav-link" href="partners.html">Partners</a>
                        <a class="nav-item nav-link" href="process.html">Process</a>
                        <a class="nav-item nav-link small1" href="contact.html">Contact Us</a>
                        <a class="nav-item nav-link small2" href="faq.html">FAQ</a>
                        <div class="img-fluid navIcons">
                            <a href="https://www.facebook.com/theforrestr/">
                                <img src="images/instagram.svg" alt="facebookIcon">
                            </a>
                        </div>
                        <div class="img-fluid navIcons">
                            <a href="https://www.facebook.com/theforrestr/">
                                <img src="images/facebook.svg" alt="facebookIcon">
                            </a>
                        </div>
                    </ul>
                </div>
            </div>
        </nav>
    </header>

    <main>
        <picture>
            <img class="img-fluid headerImg mt-5 mb-5" src="images/jungle.jpg">
        </picture>

        <div class="container">
            <div class="row">
                <div class="col d-flex mb-3 align-items-center">
                    <h1 class="m-0 ml-5" style="flex-grow: 1;">Our Story</h1>
                </div>
            </div>

            <div class="container mb-5 p-0">
                <div class="row d-flex p">
                    <div class="col-sm-12 col-md-6">
                        <p class="mb-0 px-3"><em>“The Amazon hasn't stopped burning. There were 19,925 fire outbreaks last month, and 'more fires' are in the future.”<br></em>The headline on October 18th 2019 in USA Today.<br><br><em>“As fires devastate the Brazilian Amazon rainforest, much of the world has been outraged, arguing the loss will accelerate climate change. French President Emmanuel Macron harshly criticized Brazilian President Jair Bolsonaro for encouraging deforestation. Meanwhile, similarly vast forest fires in Indonesia and Malaysia receive far less attention. In both parts of the world, forest fires usually start as controlled burns set by farmers or plantation companies wanting to clear land for agriculture: soybeans, corn or cattle ranching in the Amazon, and palm oil in Southeast Asia.”</em><br>Article in The Washington Post on October 14th 2019.<br><br>Forests are on fire. The world is on fire. Our future and the future of our children is smoldering. Now is the time that we have to act. Together.Forestr wants to support people that care about their future and the future of their loved ones. We want to bring back the beautiful colours in nature. But for that we need your help!</p>
                    </div>

                    <div class="d-sm-block d-md-none" style="height: 16px; background-color: transparent; width: 100%; visibility: hidden;"></div>

                    <div class="col-sm-12 col-md-4 d-flex quote d-sm-block d-md-none">
                        <p class="quote text-center" style="overflow-x: hidden;">“I love the forest. It is the place where you hear yourself better.”<br>- Fahadh Faasil</p>
                    </div>

                    <div class="d-sm-block d-md-none" style="height: 16px; background-color: transparent; width: 100%; visibility: hidden;"></div>

                    <div class="col-sm-12 col-md-6">
                        <p class="mb-0 px-3">Forestr is a clothing brand that produces T-shirts with colourful illustrations on them. We use colourful illustrations because we like to see things from the bright side of life. These illustrations consist of forest animals in unnatural and sometimes weird scenes. The goal is that people wonder why the animals are in that scene and not in their natural habitat. When people think about it they come to the conclusion that their natural habitat is being destroyed by fire.<br><br>By buying Forestr T-shirts you help the forester to save the forests and rebuild destroyed and burned-down forests. Our products are eco-friendly from T-shirt to packaging and we try to invest as much money as possible in rebuilding the forest. Buy our beautiful product and help us bring colours back to life and animals back to their natural habitat.<br><br>Thank you,
                        </p>
                        <div class="w-100 text-center">
                            <img class="img-fluid mt-4 w-75" src="images/Signature-01.svg" alt="ForestrSignature">
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <script src="js/jquery-3.4.1.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
    </main>

    <footer>
        <div class="container">
            <ul class="list-unstyled">
                <div class="row flex-md-row">
                    <div class="col-md-6 col-lg-3">
                        <li><a class="mx-3" href="#">Terms &amp; Conditions</a></li>
                        <li><a class="mx-3" href="#">Privacy Policy</a></li>
                        <li><a class="mx-3" href="#">Return Policy</a></li>
                    </div>
                    <div class="d-sm-block d-md-none" style="height: 10px; background-color: white; width: 100px; visibility: hidden;"></div>
                    <div class="col-md-6 col-lg-3">
                        <li><a class="mx-3" href="contact.html">Contact Us</a></li>
                        <li><a class="mx-3" href="faq.html">FAQ</a></li>
                    </div>
                </div>
            </ul>
            <a href="https://www.instagram.com/theforrestr/">
                <div class="icons mx-3 float-right">
                    <img src="images/instagram.svg" alt="instagramIcon">
                </div>
            </a>
            <a href="https://www.facebook.com/theforrestr/">
                <div class="icons float-right">
                    <img src="images/facebook.svg" alt="facebookIcon">
                </div>
            </a>
        </div>
    </footer>
</html>

Это мой код CSS:

.nav-item{
    font-size: 300%;
    font-weight: 700;
    text-transform: uppercase;
    padding-bottom: 5%;
    position: relative;
    padding-bottom: 0.03%;
}

.nav-item.small1{
    font-size: 100% !important;
    font-size: 150%;
    padding: 0px;
    text-transform: uppercase;
}

.nav-item.small2{
    font-size: 100% !important;
    font-size: 150%;
    padding: 0px;
    text-transform: uppercase;
}

.navIcons{
    width: 20%;
}

Может кто-нибудь, пожалуйста, помогите мнеи скажи мне что делать? :)

...