Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
CSS gives Web designers control over the appearance of their web sites by separating the visual presentation from the content. It lets them easily make minor changes to a site or perform a complete overhaul of the design. In CSS Web Site Design, instructor and leading industry expert Eric Meyer reviews the essentials of CSS, including selectors, the cascade, and inheritance. The training also covers how to build effective navigation, how to lay out pages, and how to work with typography, colors, backgrounds, and white space. Using a project-based approach, Eric walks through the process of creating a Web page, while teaching the essentials of CSS along the way. By the end of the training, viewers will have the tools to master professional site design. Exercise files accompany the training videos.
For this video, we're basically just going to be improving the way that the print styles look so that we in the end have something that we would want to hold in our hands on a piece of paper. We're just going to add some improvements to this things, like putting a bottom border on the masthead. In the screen styles, of course, we have a background color for the master of this site, apart from the rest of the page, but you, as has been said before, we can't expect the background to show up in print. Is just almost certainly not going to happen. So, what we're going to do is we're going to say, masthead border-bottom 1px solid #000. Now, foreground colors will show up if some of the users has a color printer, which many people do, of course, these days.
So we can set blur, colors and such but, never set a color that you are relying on to be there, for example, if you need to draw attention to something and you decided that the way you're going to do that is you're going to color the text red, and then you're going to say somewhere in your printout, look for the red text. The user may not have a color printer, they may print it out on a laser printer that doesn't do color or maybe they're really cheap and they never replace their color cartridges or whatever it is, never rely on color for those sorts of things, specially in print because there is just no way to know for sure that the user is going to have a color print out by the time they're done. For all you know, maybe the, they will print out in color and then they'll fax it to a friend who will then get it in really low-resolution, you know, one bit color one bit black-and-white, so there, you have it. If you look at this, one thing we might do in order to draw the, you know, sort of distinguish the headings from the rest of the document content is to actually make them to be a sans-serif font. So we can say nothing unusual here, so having done that, and ok, we can stick with that. That might work. Then, again, you might decide that mixing serif and sans-serif fonts, in a document isn't really your cup of tea. Ha, ha, ha. So, that's, you know, for you to decide. We've got this, this situation here, where the date is just sitting right there between the Javaco and the, the border and it would be nice if we could put it over to the right side like we did in the screen layout, but and, and also move it up, but also let's say italicize it, in order to draw attention to it. So today is actually the idea of the other element containing the date and we might say text-align right which will push it all the way over to the right side. font-style italic, and then we're going to give it a negative top margin, just like we did in Chapter 7, in the last video there, so in this case we're just going to give it a negative top margin of 1em, no side margins, a little bit. Well actually let's just give it no bottom margin to start with.
So we hit Reload and there you can see that the date flows over to the right side, shifts itself up thanks to that negative top margin and italicizes itself, but then also that brings that border up pretty darn close to the date into the Javaco tea bit, so with a little bit of bottom margin on the date, we can actually push that border down a little bit so we'll hit Reload, that pushes it down a bit, that, that feels a little bit better.
So we're going to, we're going to stick with that. Now, what we also want to do here is push the content in a little bit. Now there's a reason for this, and is mostly because there's the content margins 0.5%. So will be no top and bottom margin but 5% left and right margins and if we hit Reload, that will shift the content inward.
The reason that we added the 5% there is because I think that just the content looks better if it shifted in little bit the main content. So you have a masthead that sort of spreads out and eventually we'll have a footer that does the same, but the main content is pushed in a little bit. It's a little bit constraining and makes it fell a little bit more like, I don't know, a magazine print out, let's say. This is more of a personal feeling, it does reduce somewhat the amount of, of print area that can actually be used by the content and so that could make a document longer, it could make it run multiple pages, make it run on two pages instead of one for example, that's, you know, that's just something that every person has to decide, but this shows how we can, we can squeeze this down a little bit.
On the other hand, that about tea history heading, I kind of like to pull that back to where it was, or at least get it close. So we can do that just by saying content h1, margin-left -5% and it'll pull it back. Now, maybe this works and maybe it doesn't. It works for me, so we're going to stick with that.
And then that's going to bring us to a good place to, to reflect upon what we're going to do about the tea of the day and the footer, which we're going to talk about in the next video.
There are currently no FAQs about CSS Web Site Design.
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.