« Web, HTML, Tech Forum

Help on CSS code

So I saw the advent calendar codes and I wanted to add it on my profile but somehow it broke it and I don't know how to fix it. If you are an expert in CSS, could you please check the coding and how I could fix it?

Code itself:

<style>

@import url(https://db.onlinewebfonts.com/c/a56f956c8246b0f4dd0c5b24fce859f1?family=DFPPOPCorn-W12);

body{font-family: 'DFPPOPCorn-W12';}

</style>


<style>

.general-about{

  position: relative;

  margin-top: 30px;

}

.general-about .profile-pic::before{

  content: '';

  background: url('https://media.giphy.com/media/rXyIg5TrQ3jYuZME1G/giphy.gif') no-repeat;

  background-size: cover;

  display: block;

  width: 100px;

  height: 100px;

  z-index: 999;

  position: absolute;

  top: -43px;

  left: -32px;

}

</style>


nav img.logo {

 content:url("https://media.discordapp.net/attachments/991164031358480394/1106998786942840852/rumialogo2.png");

    }

}


}

 .profile {

  background: rgb(236, 233, 245);


}


}

body:before {


content: " ";


height: 100vh;


width: 100vw;


display: block;


position: fixed; 


top: 0; 


left: 0; 


z-index: 100;


background-image: url(https://imagizer.imageshack.com/img923/581/Fh3EMX.jpg);


background-size: cover;


background-repeat: no-repeat;


background-position:center;


animation: yourAnimation 1s ease 0s 1 normal forwards;


pointer-events: none;}


@keyframes yourAnimation { 0.0%{ opacity: 1;} 75%{ opacity: 1; } 100%{ opacity: 0;} 

}

    body {

      background: url(https://imagizer.imageshack.com/img923/581/Fh3EMX.jpg);


}


main:before {

    width: auto;

    margin-bottom: 25px;

    border: 1px solid black;

    height: 240px;

    display: block;

    content: "";

    box-shadow: 0px 0px 5px 1px #f312ff;

    background-image: url(https://imagizer.imageshack.com/img922/7052/EjMIbZ.jpg);

    background-position: center center;

    background-size: cover;

}


footer {

    border-radius: 15px;

    background-image: url(https://imagizer.imageshack.com/img922/3552/FjZdz4.jpg);

    color: rgb(42, 52, 92);

}


table.comments-table td {

    color: rgb(255, 77, 166);

}


:root {

    --logo-blue: rgb(58, 27, 99);

    --darker-blue: rgb(255, 74, 146);

    --lighter-blue: rgb(58, 27, 99);

    --even-lighter-blue: rgb(190, 105, 255);

    --lightest-blue: rgb(212, 156, 255);

    --dark-orange: rgb(255, 158, 226);

    --light-orange: rgb(255, 74, 146);

    --even-lighter-orange: rgb(236, 233, 245);

    --green: pink;

}


<style>

* { 

    cursor: url('https://cdn.discordapp.com/attachments/698186346598105110/1152062768921452594/a2ek3-k13nc.png'), auto; 

}

a:hover {

    cursor: url('https://cdn.discordapp.com/attachments/698186346598105110/1152062829101338704/azanq-xz75j.png'), auto;

}

</style> 


Report Topic

2 Replies

Sort Replies:

Reply by arlo atomickk

posted

Avoid ending the style in the middle of code as it will ignore the rest of it. try this instead:


<style>

@import url(https://db.onlinewebfonts.com/c/a56f956c8246b0f4dd0c5b24fce859f1?family=DFPPOPCorn-W12);

body{font-family: 'DFPPOPCorn-W12';}


.general-about{

  position: relative;

  margin-top: 30px;

}

.general-about .profile-pic::before{

  content: '';

  background: url('https://media.giphy.com/media/rXyIg5TrQ3jYuZME1G/giphy.gif') no-repeat;

  background-size: cover;

  display: block;

  width: 100px;

  height: 100px;

  z-index: 999;

  position: absolute;

  top: -43px;

  left: -32px;

}


nav img.logo {

 content:url("https://media.discordapp.net/attachments/991164031358480394/1106998786942840852/rumialogo2.png");

    }

}


}

 .profile {

  background: rgb(236, 233, 245);


}


}

body:before {


content: " ";


height: 100vh;


width: 100vw;


display: block;


position: fixed; 


top: 0; 


left: 0; 


z-index: 100;


background-image: url(https://imagizer.imageshack.com/img923/581/Fh3EMX.jpg);


background-size: cover;


background-repeat: no-repeat;


background-position:center;


animation: yourAnimation 1s ease 0s 1 normal forwards;


pointer-events: none;}


@keyframes yourAnimation { 0.0%{ opacity: 1;} 75%{ opacity: 1; } 100%{ opacity: 0;} 

}

    body {

      background: url(https://imagizer.imageshack.com/img923/581/Fh3EMX.jpg);


}


main:before {

    width: auto;

    margin-bottom: 25px;

    border: 1px solid black;

    height: 240px;

    display: block;

    content: "";

    box-shadow: 0px 0px 5px 1px #f312ff;

    background-image: url(https://imagizer.imageshack.com/img922/7052/EjMIbZ.jpg);

    background-position: center center;

    background-size: cover;

}


footer {

    border-radius: 15px;

    background-image: url(https://imagizer.imageshack.com/img922/3552/FjZdz4.jpg);

    color: rgb(42, 52, 92);

}


table.comments-table td {

    color: rgb(255, 77, 166);

}


:root {

    --logo-blue: rgb(58, 27, 99);

    --darker-blue: rgb(255, 74, 146);

    --lighter-blue: rgb(58, 27, 99);

    --even-lighter-blue: rgb(190, 105, 255);

    --lightest-blue: rgb(212, 156, 255);

    --dark-orange: rgb(255, 158, 226);

    --light-orange: rgb(255, 74, 146);

    --even-lighter-orange: rgb(236, 233, 245);

    --green: pink;

}


* { 

    cursor: url('https://cdn.discordapp.com/attachments/698186346598105110/1152062768921452594/a2ek3-k13nc.png'), auto; 

}

a:hover {

    cursor: url('https://cdn.discordapp.com/attachments/698186346598105110/1152062829101338704/azanq-xz75j.png'), auto;

}

</style> 


Permalink Report Reply

Reply by ZeZunStyler

posted

Thank you so much for the help and code. My profile works now. Idk what to say else but merry Christmas to you and thanks again for the code!^^


Permalink Report Reply