Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
CSS enables you to control the look and layout of a web page much more precisely than you could with HTML alone, but it can be time-consuming to learn. In this workshop, expert developer Candyce Mairs makes styling a quick and easy process, walking you through the process of adding content to a web page and using CSS to position that content. Candyce explains CSS positioning concepts like the CSS box model, floats, and clears and demonstrates how HTML and CSS work together to create the look of your web page. By speaking the same language as the browser, you can learn to work with the browser to place content accurately and easily.
At this point, I'm down to fine-tuning my web page to better match my design. And I have the present web page open in the browser as it looks right now. I also have my design open in the browser. And one of the things I'm not real happy with, is the font in the left column. This is my original design font, and this is how it looks now. Right now, I'm using Georgia font, and I'm not real pleased with how that looks.
So, what I want to do, is modify the font for that left column to get it to better match my design. So I'll close up my web page, and I have an idea of the font I want to use. I've done some research, and there is a font or a font stack, which means a sequence of fonts, that should be on most people's systems. And I'm going to adjust to that font, because it should better match my original design.
Now, you can see I'm typing out a font stack. What that means, is it's a sequence of fonts that the browser can look for. So, the first font the browser's going to look for, is Palatino Linotype on the user's system when they go to view this page. Because this font has a space inside of it, in CSS, I need to use quotes surrounding it. The next font the system will look for, is Book Antiqua, which is almost identical to Palatino Linotype.
So, if they don't have Palatino Linotype, it will check for Book Antiqua. And if they don't have that font, it'll go down to regular Palatino. And if they don't have any of those three, it will be the default Serif font. Now I'm going to apply that font. I'll go ahead and copy it, and paste it down into the rest of the formatting areas for my left column. So, I'll go ahead and paste that into all three items.
My header one within the left column, my header two within the left column, and my paragraphs within the left column should all now have that Palatino Linotype font, or one in the font stack. So, I'll go out and look at this, and I think that looks a lot better than the original font that I was using. Now this font looks like it might be a little bit larger font, as well.
So, sometimes when you change the font, you also have to modify the font size just a little bit. Let me go ahead and put this the full width of the browser, and I think that font size is pretty good. What I'd want to do is test this on a variety of systems in order to determine if this font size is okay. I am on a PC, and on a Mac, font size can be a little bit smaller. Since we're using em's as our unit of measure, it should help minimize that. So, it's really up to me if I want to make that little bit smaller. So, let me look at that one last time in Firefox for that font, and I think I'm set.
Now my upcoming events, I think still maybe a little bit big. So, let me make that just a little bit smaller. Right now, it's 1em, it's my header two in the right column, so I will make that 0.95. The nice thing about using em's as a unit of measure, is that you have a lot of variety, because you can go down to the decimals. And that looks much better. So, there is my web page, based on my graphic design.
There are currently no FAQs about Exploring CSS Positioning.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.