Start learning with our library of video tutorials taught by experts. Get started

Exploring CSS Positioning

Adding CSS properties to the right column


From:

Exploring CSS Positioning

with Candyce Mairs

Video: Adding CSS properties to the right column

What I'm now going to do is modify the CSS Properties for the right column on our page. I'll be modifying properties for both the column itself, as well as content within that column. I've done that for the menu area, and also done it for the left column. So, now it's time to do the right column. The first thing I want to do is these two images are reverse from what they should be.
Expand all | Collapse all
  1. 1m 13s
    1. Welcome
      1m 13s
  2. 33m 20s
    1. Why CSS positioning?
      5m 50s
    2. HTML editors
      3m 18s
    3. Getting set up
      3m 39s
    4. Previewing pages in browsers
      3m 51s
    5. Customizing the HTML editor
      5m 32s
    6. Exploring browser variances
      5m 16s
    7. Browser extensions
      5m 54s
  3. 30m 33s
    1. HTML vs. CSS: Which does what?
      9m 55s
    2. HTML div tags
      4m 57s
    3. CSS properties
      6m 21s
    4. The CSS box model
      9m 20s
  4. 28m 46s
    1. Planning the page layout
      3m 47s
    2. Building the header box
      6m 23s
    3. Positioning with HTML
      3m 36s
    4. Positioning with CSS
      8m 21s
    5. Foreground vs. background content
      6m 39s
  5. 25m 44s
    1. Building the menu box
      5m 7s
    2. Adding the menu links
      4m 58s
    3. Formatting the menu with CSS
      6m 43s
    4. Positioning the menu with CSS
      8m 56s
  6. 21m 42s
    1. Adding the middle column
      6m 29s
    2. Creating a CSS rule for the column
      6m 20s
    3. Adding CSS rules for the column
      8m 53s
  7. 19m 49s
    1. Adding the right column and inserting images
      7m 33s
    2. Completing the right-column content
      4m 18s
    3. Formatting the right column using CSS
      7m 58s
  8. 26m 14s
    1. Understanding the float property
      6m 5s
    2. Applying the floats
      6m 1s
    3. Finishing the floats
      6m 24s
    4. Adding CSS properties to the right column
      7m 44s
  9. 30m 59s
    1. Setting up for background colors
      5m 49s
    2. Adding a footer
      8m 50s
    3. Adding the background colors
      7m 20s
    4. Positioning the footer
      9m 0s
  10. 16m 38s
    1. Comparing the web page to the graphic design
      6m 50s
    2. Adjusting the web page as needed
      4m 25s
    3. Adding the final touches
      5m 23s
  11. 2m 43s
    1. Closing thoughts
      2m 43s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Exploring CSS Positioning
3h 57m Beginner May 24, 2012

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.

Topics include:
  • Previewing pages in browsers
  • Customizing the HTML editor
  • HTML vs. CSS: which does what?
  • Building the header area
  • Adding the navigation menu
  • Positioning using a float
  • Adding background colors and images
  • Comparing the web page to the graphic design
Subjects:
Web Web Design video2brain
Software:
CSS
Author:
Candyce Mairs

Adding CSS properties to the right column

What I'm now going to do is modify the CSS Properties for the right column on our page. I'll be modifying properties for both the column itself, as well as content within that column. I've done that for the menu area, and also done it for the left column. So, now it's time to do the right column. The first thing I want to do is these two images are reverse from what they should be.

My seahorse should be on the left, and this orange clam should be on the right. And that's an easy fix. It's just taking the HTML for the seahorse image and moving it in front of the orange clam image. So I'll go ahead and do that, and now my seahorse is on the left, and the clam is on the right. Now, I think these images are a little bit tight on this left-hand side. My column is also up way too high, so my image is almost butting up against the upper header.

What I'm going to do is go out to the column itself, which is controlled by the right id in my CSS rules and modify that. Let me go up to the right ID within my CSS rules. And that's this one, right here with pound right. First of all, I have this border that I don't need anymore. So I will get rid of that border, just deleting it. You can see the border is now gone on my page.

Then next thing I want to do is move this image down. I'm going to add some Padding to the top of this column so that will automatically move my image down, and that is done in the right ID. I will add Padding-top, and the top Padding, I will put in as 44 pixels. Next, I'm going to add Padding Left to this column of 20 pixels.

What that's going to do is move everything in this column over to the right. So, there's a little bit more space between these columns. I think that looks much better. Now, my images are what I need to address next. How can I address all three images within the right column? Well, what I can do is say, if it's an image tag inside the right column. And that's just like I did with the Header 2 here, or the paragraph tag.

So, I will add a style here and say, if it's inside the right ID, and the space takes up an and, it's an image tag. I want to do something. And what I'm going to do is add some Padding on the bottom of all of these images. So, all three images will get a little more space underneath them. And doing it this way, based on the image tag, it will allow me to do them all at one time, which is really a nice feature. So, I'll do Padding Bottom of 25 pixels, and what that did was spread out my images just a little bit.

It also put some additional space underneath my last two images. Now, my seahorse here and my clam are a little bit too tight together. So, to get my clam to move up so that these two are exactly even, I can do it real quick in HTML. For my seahorse image, what I'm going to do is add a line equals loft. What that will do is move my seahorse image.

Now however, I have a little issue with this clam being a little bit too tight to my seahorse. And there are ways to modify that in HTML. But not as flexible as if we do it in CSS. So, what I want to do is put some left Padding on my clam image. How do I go about doing that? Well virtually, the same way we did it with the image tag itself. But if I use the image tag, it does it to all three images. So, how can I assign some CSS properties to just this clam image? Well, just like we assign an ID to a DIV Tag, I'm going to assign an ID to an image instead.

An ID can be assigned to anything within your page, an HTML tag included. Now that I have an ID here, assigned to this image, I can go up to the top. So, now up in my Style roles, I'm going to add an ID Style Role for clam. An ID always starts with the pound sign. And then I'll add my curly brackets, just like I've done with any other ID. In this one, I'm going to say Padding Left.

So, what I'm going to do is add Padding just to that left side of my image, and let me do 25 pixels there. Now, you can see I'm not quite after to the right-hand side. In terms of alignment, this also has a bit of an issue, it's come up a little too high. My left align on this image has pulled this text up because this image is too short. So I have two additional things I want to do.

Let me just raise the Padding Left to 40, and let's see what that does. And that lined it up pretty nice here. So, my clam is lined up. Now, what I need to do is take care of this Upcoming Events. And the way I'm going to handle this is I'm going to ad some margin underneath my clam. What that will do is push this down so that it will end up left aligned with the rest of my text. Let's take a look at that.

I will add margin bottom of 40 pixels, and let's see where we're at. Look at that. My margin bottom of 40 pixels took care of that particular issue. The last thing I need to do with regards to the right column is take a look at it in the browser. I'll go out to Internet Explorer, just to be different, and take a look at the layout of my right column, and it's looking pretty good.

I've now modified the CSS Properties, for the right column, the DIV itself, as well as the individual pieces of content within the DIV. You can see how handy CSS Properties are in order to manipulate content within your browser window.

There are currently no FAQs about Exploring CSS Positioning.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Exploring CSS Positioning.

Return to your organization's learning portal to continue training, or close this page.


OK

Course retiring soon

Exploring CSS Positioning will be retired from the lynda.com library on April 24, 2014. Training videos and exercise files will no longer be available, but the course will still appear in your course history and certificates of completion. For updated training, check out CSS: Page Layouts in the lynda.com Online Training Library.


Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked