hey, got an annoying problem which will probably really obvious to anyone else.
to make sure no weird white like, lines come out from any element added to the site, i need to use the ‘*’. I’ve tried having as its own separate part of the code, separating the background colour from the section the asterisk applies to, ect. and if i remove the background colour from this part of my code, the white comes back
I really need to sort this issue out, i feel like its probably a really easy fix and I’m just being a moron, but i genuinely cannot figure it out.
whenever i try and add text into the second box, the background colour of the website is added to the text.
html {
* {
margin:0;
padding:0;
box-sizing:border-box;
font-family:Helvetica;
color: olive;
}
background-color: bisque;
<!--this is just a placeholder so its more visible on the image--!>
}
this is the white i mean, i assume its part of the padding or the margin, but trying to mess with either of those doesnt fix it at all.
whenever i put the background into its own section within a new ‘html {’ section it doesnt show up at all. I might just be being dumb about things, but the only way I knew how to build a website was in dreamweaver (which is where i was taught) so im trying to figure out on my own and no tutorial i find is really helping me at all
if the background color isnt within the *{ } parameter in the code it doesnt display, but if i try to add anything to any other box in the code it gives everything the background colour, if i remove the * from the code it adds this white, i dont even know what to call it (shown in my second reply in the thread) and nothing i do gets rid of it unless i add the asterisk to the html body
You miss the head element inside your html element.
<head></head> element is where you place your internal stylesheets which is referred to style element
This is the most basic HTML structure boilerplate.See the note I wrote for you inside this code piece.
<!DOCTYPE html> <!--declearation-->
<html lang="en"> <!--HTML root element with language attribute set to English-->
<head> <!--HTML head element which is used to hold meta info for browser,links of external resources and CSS stylesheets and so on -->
<meta charset="utf-8"/> <!--meta info-->
<title></title> <!--name of your website tab-->
<link rel="stylesheet" href=""> <!--links for external stylesheets-->
<style></style> <!--place for your internal stylesheets-->
</head>
<body> <!--HTML body element which is used to hold everything that the users will see on your website -->
</body>
</html>
Second one is what I have already mentioned above.