CSS starter questions

kkw16

New Member
Hi I am a beginner coder in CSS.

I am doing a reset for my style.css
/* RESET */
*{
margin:0;
padding:0;
border:0;
font-size:100%;
vertical-align:baseline;
text-decoration:none;
display:block;
}

after using "display:block"

my title tag shows up why is that?

Should I not be using "*" to reset?

Thank you

kkw16
 

ronaldroe

Super Moderator
Staff member
You really shouldn't put display:block in your reset. It's likely why your title is showing up on your page. When you put that in there, everything that was set to display:inline, such as <span>, <em>, <b> and others will act as block level elements. They will have their own lines. Also, elements that are normally set to display:none, like the <title> tag, will now also be block level.

Opinions vary on the use of the wildcard selector. Using that for your reset, for instance will cause list items to lose their bullets. Knowing that, I use it anyway and just add a margin back into list items.
 
Last edited:
Top