forum Posted August 28 Share Posted August 28 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; } Quote Link to comment https://forums.phpfreaks.com/topic/323638-there-is-no-style/ Share on other sites More sharing options...
Barand Posted August 28 Share Posted August 28 Try a ... <html> <head> </head> <body> </body> </html> ... structure instead of your pick'n'mix approach to the documant sections. (And why was this posted in PHP Coding Help forum?) Quote Link to comment https://forums.phpfreaks.com/topic/323638-there-is-no-style/#findComment-1634054 Share on other sites More sharing options...
forum Posted August 29 Author Share Posted August 29 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) Quote Link to comment https://forums.phpfreaks.com/topic/323638-there-is-no-style/#findComment-1634170 Share on other sites More sharing options...
gizmola Posted September 2 Share Posted September 2 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. Quote Link to comment https://forums.phpfreaks.com/topic/323638-there-is-no-style/#findComment-1634444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.