Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now, we come to the most impactful video of the entire course: the one that lets you change background colors and images. I don't have to tell you what a difference it will make because you'll see; it will be absolutely obvious once we start. So, let's get to it. As usual, you launch the Theme Builder by clicking Appearance. Once there, you click Styles and Background. Now you'll notice that it shows the Background color is being black, but that's just because nothing is actually selected. So the first thing we do is we're going to select the entire page background.
Just click anywhere in the background and then take a look at the selectors down here. And we see, yes, that's the entire page. If you hadn't turned on Power theming or Show CSS, it would have said, You are styling: The page, but I prefer to leave those on. We talked about the information in this bar in the video about refining selections in the Theme Builder. Let's go through a few different colors and see what it looks like. Right now, it shows no color. That's the little checkerboard pattern. It's sort of subtle, but if you look closely, you can see it.
But we could change it let's say to brown, or green, or a light gray. The colors that you see here are the ones that came with this Kenwood color scheme that we selected in a previous video. You can also have a custom color if you like by just clicking this little Plus sign and moving around as you would in any other kind of color selector. Let's just say Add. Let's have a dark blue background. Ugh, that's terrible. Okay, we'll get rid of that and switch back to a light gray. One thing you might notice is that no matter what color we choose, it lowers the contrast throughout the page.
The text isn't quite as easy to read when we have that color selected. Let's go back and select the area--make it like a green. Now you can't read anything at all. Even a gray makes it a little bit harder to read. So, I'm going to just go back to what we had before. One way of doing that is just clicking off, say over to this Close Theme Builder button, and we're back to white. Now let's move to putting in a graphic. Remember, as with any web graphic, you'll have to create and adjust it in an image-editing program.
lynda.com has lots of videos that'll help you with this, one of them being "Photoshop for the Web." One popular kind of image to use as a background is a gradient, and so that's what I'm going to do. I have one right here. I'll just click Browse and then go into my exercise files and open page_background.jpg. As we scroll down this page, we see it gets lighter as we go. We also have it repeating. If we turn off the repeat so that it doesn't go left to right or right to left, we see the actual graphic itself is a very thin little thing over here.
But the default repeat is for it to repeat in both directions, up and down and right to left. The problem with that though is if the page is long, as is true in our case, it then starts again right here. So instead, I'm going to have it only repeat horizontally. There, now it goes all the way from this dark blue down to white, and then since the rest of the page is white, it just blends in naturally. Now that we've done that, I'm just going to publish it. Then I'm going to close out the Theme Builder, just so I can take a clear look at exactly what I have. Yup! Looks pretty good.
There is one thing that I don't like though, which is although it's nice to have this dark color up here, when we get in here we can't read any of the text. That's okay though. We can change all of this area in here, so it's white, and we just have the background around the edges. To do that of course, we go back into our Theme Builder, click Styles, and once again Background. Now I have to find the area that I want to change that I want to not have that background. So, I would start clicking around here. Well, that's just the header area, and again you see it here in the CSS selector.
That's the main. Ah, but when I click main, I see it gets bigger and bigger. I'm going to try just this content area, and get rid of everything else. Then if I scroll around, I can see the boundaries of what that content area actually is. It's that solid blue border. Now, I've worked with these themes, and I happen to know that that's what I want, so that's what I'm going to do; I'm going to change that Background to be white over here. Say OK and once again I'll publish it.
We're well on our way. And here is a little something that's really impactful: what I just showed you not only works for the pages background, and not only for large area backgrounds, but for any background. In fact, I'm going to put a graphic in at the top of the page. To do that, I select the area once again. And I happen to know that this one is going to be the header area, so that's the one I'll use. I'll go back in and browse as I did before, and choose this main_back-top graphic, and select Open.
That looks pretty good. But in this case, the graphic isn't quite wide enough. Ideally, we would go back and fix the graphic, but let's say you don't have that option. You can also fix the spacing of that graphic, and I'll show you how to do that in the video about changing element spacing and borders. There is one last thing I want to mention about putting in colors or backgrounds, which is you have to be careful when you apply it to something that has a rollover, because the thing is you might change the background for one state of the rollover but not for another state.
In that case, you have to start messing around with all of those pseudo-classes that I talked about before, and make sure that you have matching colors or matching graphics for both when you roll over and when you leave. The last thing I'll do of course is to publish this. And so that we can see what it looks like, I'll close out the Theme Builder. Boy, that made a big change, didn't it? Background graphics are great, but as you can see, they require a little bit of attention. You have to either edit them beforehand, so they fit your page, or change the spacing of your page afterward so it fits the graphic.
We're actually going to do the latter in that video I mentioned about changing element spacing and borders, although that's backward from the way that traditional web design works. Usually, it's easier to edit the image than play with CSS, but with Drupal Gardens' Theme Builder CSS is so easily handled and so fluidly handled, I find that you can do either one just as easily.
Get unlimited access to all courses for just $25/month.Become a member
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.
Your file was successfully uploaded.