Задать вопрос
@FavnAristotel

Почему сайт в просмотре кода работает нормально в хроме а без него не правильно?

Почему сайт в просмотре кода работает нормально в хроме а без него не правильно?
Как будто какие то стили не применяются .
Смотрю на компьютере с разрешением 1920 на 1080px.
67c13ad47c370620265344.jpeg
67c13adbe7efb090200018.jpeg
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"
        rel="stylesheet">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>

<body>
    <div class="wrapper">
        <header class="header">
            <div class="container">
                <div class="header__inner">
                    <a href="" class="header__logo logo">
                        <div class="logo__image">
                            <img src="image/logo.png" alt="">
                        </div>
                        <div class="logo__title">BlueRex</div>
                    </a>
                    <nav class="header__menu menu">
                        <ul class="menu__list">
                            <li class="menu__item">
                                <a href="" class="menu__link">Home</a>
                            </li>
                            <li class="menu__item">
                                <a href="" class="menu__link">About</a>
                            </li>
                            <li class="menu__item">
                                <a href="" class="menu__link">Feauters</a>
                            </li>
                            <li class="menu__item">
                                <a href="" class="menu__link">Product</a>
                            </li>
                            <li class="menu__item">
                                <a href="" class="menu__link">Reviews</a>
                            </li>
                            <li class="menu__item">
                                <a href="" class="menu__link">Faq</a>
                            </li>
                            <li class="menu__item">
                                <a href="" class="menu__link">Contact</a>
                            </li>
                        </ul>
                    </nav>
                    <div class="header__burger-menu burger-menu">
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                </div>

            </div>
        </header>
        <div class="page">
            <section class="main-block">
                <div class="container">
                    <div class="main-block__overlay">
                        <div class="main-block__body">

                            <div class="main-block__lable">We are best and creative agency</div>
                            <div class="main-block__title">
                                We turn creative ideas
                                into your business.
                            </div>
                            <div class="main-block__text">
                                Lorem ipsum dolor sit am et, consec tetur adipi scing elit. Sed sodales enim ut rhoncus
                                lorem ipsum ese terds.
                            </div>
                            <div class="main-block__buttons ">
                                <a href="" class=" button main-block__button ">our story</a>
                                <a href="" class="button main-block__button button--lilack">read more</a>
                            </div>
                        </div>
                    </div>

                    <div class="main-block__image">
                        <img src="image/main-picture.png" alt="">
                    </div>
                </div>
            </section>
   </div>
    </div>
</body>

</html>
<code lang="cpp">
@font-face {
    font-family: "PalatinoLinote";
    src: url("/font/palatinolinotype_roman.ttf");
}

@font-face {
    font-family: "PalatinoLinote Bold";
    src: url("/font/palatinolinotype_bold.ttf");
}

@font-face {
    font-family: "PalatinoLinote Bold italic";
    src: url("/font/palatinolinotype_bolditalic.ttf");
}

@font-face {
    font-family: "PalatinoLinote italic";
    src: url("/font/palatinolinotype_italic.ttf");
}

body {
    font-family: "Montserrat", serif;

}

* {
    padding: 0;
    margin: 0;
}

.wrapper {
    width: 100%;
    max-width: 1900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;

}

.header {
    z-index: 5;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    // .header__inner

    &__inner {
        display: flex;
        align-items: center;
        min-height: 160px;

        @media (max-width:1100px) {
            justify-content: space-between;
        }
    }

    // .header__logo

    &__logo {
        text-decoration: none;
        display: flex;
        align-items: center;
    }

    &__logo>*:not(:last-child) {
        margin-right: 10px;
    }

    // .header__menu

    &__menu {}

    // .header__burger-menu

    &__burger-menu span {
        width: 50px;

        background-color: white;
        height: 3px;
        display: flex;
        flex-direction: column;
    }

    &__burger-menu span:not(:last-child) {
        margin-bottom: 10px;
    }
}

.container {
    box-sizing: border-box;
    max-width: 1640px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.logo {

    // .logo__image

    &__image {}

    // .logo__title

    &__title {
        font-weight: bold;
        font-size: 41px;
        color: #fff;

    }
}

.menu {
    margin-left: auto;

    // .menu__list
    @media (max-width:1100px) {
        display: none;
    }

    &__list {
        list-style-type: none;
        display: flex;

    }

    // .menu__item

    &__item {
        margin-right: 40px;
    }

    // .menu__link

    &__link {

        text-decoration: none;
        color: #fff;
    }
}

.burger-menu {
    padding-top: 8px;

}

.page {}

.main-block {

    position: relative;
    color: #fff;
    background-image: url(image/main-bg.png);
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 843px;
    padding-top: 160px;
    box-sizing: content-box;

    // .main-block__body
    &>.container {
        padding: 0;
    }

    &__body {

        width: 760px;
        z-index: 3;
        position: relative;
        padding: 30px;

        @media (max-width:800px) {
            width: 400px;
        }

        @media (max-width:500px) {
            width: 280px;
            padding: 0 20px;
        }
    }

    &__overlay {
        padding-top: 150px;
        padding-left: 140px;
        position: relative;

        @media (max-width:1100px) {
            width: 100%;
            padding-left: 0;
        }
    }

    &__overlay::after {
        @media (max-width:1500px) {
            background-color: #fff;
            opacity: 0.5;
            z-index: 2;
            content: "";
            width: 760px;
            height: 100%;
            display: block;
            position: absolute;
            top: 130px;
            left: 150px;
        }

        @media (max-width:1100px) {
            width: 100%;
            left: 0;
        }


    }

    &__body>*:not(:last-child) {
        margin-bottom: 30px;
    }



    // .main-block__lable

    &__lable {
        font-size: 42px;
        font-family: "PalatinoLinote italic";
        font-style: italic;
    }

    // .main-block__title

    &__title {
        margin-bottom: 50px;
        font-size: 64px;

        @media (max-width:800px) {
            font-size: 35px;
        }
    }

    // .main-block__text

    &__text {
        font-size: 23px;
    }

    // .main-block__butttons

    &__buttons {
        display: flex;
        padding-left: 50px;

        @media (max-width:500px) {
            padding-left: 0;
        }

    }

    &__buttons>*:not(:last-child) {
        margin-right: 20px;
    }

    // .main-block__button

    &__button {

        background-color: #773190;


        @media (max-width:500px) {
            font-size: 12px;
        }
    }

    // .main-block__button--purple



    &__image {
        right: 310px;
        bottom: 0;
        position: absolute;
        z-index: 1;

        @media (max-width:1300px) {
            right: 100px;
        }
    }

    &__image img {
        width: 100%;

        z-index: 1;
        position: relative;
        display: block;
    }
}

.button {
    text-decoration: none;
    border-radius: 30px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    padding: 0 40px;
    color: #fff;
    text-transform: uppercase;
    font-size: 16px;
    text-align: center;
    background-color: #F32161;
}

.overlay {}

.button--lilack {
    background-color: #773190;
}
</code>
  • Вопрос задан
  • 70 просмотров
Подписаться 1 Простой 3 комментария
Решения вопроса 1
@FavnAristotel Автор вопроса
Странно переименовал директорию которая была на русском языке и все исправилось .
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
@Everything_is_bad
Как будто какие то стили не применяются.

Странно скопировал код в другую папку и все нормально


Учить базу и понимать чем отличается в<link rel="stylesheet" href="style.css"> от <link rel="stylesheet" href="/style.css">, а также у src в img и других ссылках
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы