Jump to content

Recommended Posts

I can't understand why the styles disappeared

<?php 
$path = $_SERVER['DOCUMENT_ROOT'];

?>

<!DOCTYPE html>
<html lang="en">
    <?include "$path/private/head.php"; ?>
<body>
    <div class="cont">
        <?include "$path/private/header.php"; ?>
        <main class="startPage">
            <div id="startLogin" class="startbtn">Log In</div>
            <div id="startSignup" class="startbtn">Sign Up</div>
        </main>
        <?include "$path/private/footer.php"; ?>
    </div>
</body>
</html>
//это head отдельный файл 
<head>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/css/styles.css">
    <script src="/js/jquery-3.7.1.min.js"></script>
    <script src="/js/script.js"></script>
</head>
//style
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    background-color: gray;
}
.cont{
    height: 100vh;
    width: 960px;
   
    margin: 0 auto;
    display: grid;
    grid-template-rows: 100px 1fr 100px;
    gap: 5px;
}
header,main,footer{
    border-radius: 10px;
}
header{
    background: linear-gradient(white,skyblue);
    color: rgb(147, 136, 136);
    font-size: 2.3rem;
    display: grid;
    align-content: center;
    justify-content: center;
    letter-spacing: 5px;
}
.startPage{
    display: grid;
    align-content: center;
    justify-content: center;
    gap: 20px;
    background-color: white;
}
.startbtn{
    width: 180px;
    height: 80px;
    background: white;
    border-radius: 10px;
    display: grid;
    align-items: center;
    justify-items: center;
    font-size: 2rem;
    color: skyblue;
    border: 2px solid skyblue;
   transition: all .5s;
    cursor: pointer;
}
.startbtn:hover{
    color: pink;
     box-shadow: 0px 0px 20px gray;
}
footer{
    background-color: white;
}

 

Link to comment
https://forums.phpfreaks.com/topic/323638-there-is-no-style/
Share on other sites

On 8/29/2024 at 1:59 PM, forum said:

This answer is of course not clear to me, just like And why was this published on the PHP Coding Help forum? A newbie will post where he understands, if the developer of some forum has not developed it to full understanding, then the newbie is not to blame)

 You have 2 <head> sections.  You can not do that.  You can't re-define a new <head> section after you have already defined it.

Link to comment
https://forums.phpfreaks.com/topic/323638-there-is-no-style/#findComment-1634444
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.