Introduction to CSS3 Part 2

Welcome everyone to part 2 of the CSS3 introduction.

Today we are going to go more in depth into selectors so let’s get started!

Let’s first talk about Universal selector this is for the entire page anywhere that is selected by it. The code looks like the following:

*{margin: 0px} what does this mean? This means that every margin on every page unless otherwise specified is going to have a margin of 0.

Let’s take a look at this in action in our code:


so what does this look like in our browser??


As you can see above it changed all of our text to green!

Next is ID selectors we can specify particular parts of data and make that a certain color or whatever we want to do to it. We can use <div> or name our data like the following example:

<p class=”content”>

How can we specify this you as? Well in our css we would do it like this:

.content {color: green; font-size: 3em}

So what would this look like in our code? Let’s have a look shall we?


As we can see above in our CSS document .information is the class we specified and the color is blue and size is 3em. Let’s see what it looks like in our HTML document:


We can see here that we identified the <p> tag with a class element names information. So in our css where ever there is a class element of information it will change our text accordingly.

That’s it for this post I look forward to teaching you more! If you have any questions please feel free to ask below!


Looking for quality phpBB Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , | Posted under Programming/Coding | RSS 2.0

Author Spotlight

Keith Pottratz

Hello My Name is Keith Pottratz. I have been working with computers for over a decade. It's my personal hobby something that I love and enjoy doing. I went to school for Computer Science, and have spent many years self teaching my self various things. I have ton's of experience in HTML,CSS, PHPBB,CPanel,CMS software, blogging software and various other systems and enviroments. My favorite thing to do though is backend developing. I find it to be a growing and ever evolving beast and I love learning about it. I look forward to giving as much knowledge as I can and help.

Leave a Reply

Your email address will not be published. Required fields are marked *