Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Customizing a liquid layout

From: Web Accessibility Principles

Video: Customizing a liquid layout

>> As we saw in the last movie, liquid width designs can improve accessibility by offering web users an even greater range of control over the page to suit their needs. We're going to use the page saved in the last movie name liquid.html as the start of an example site to build. If you're following along with the exercise files and do not already have liquid.html open in Dreamweaver from the last movie, it's located in a folder named 03_06 in the chapter three folder of your exercise files. We'll begin our customization of this page by changing some width values to better suit a wider variety of designs and make it a little more robust.

Customizing a liquid layout

>> As we saw in the last movie, liquid width designs can improve accessibility by offering web users an even greater range of control over the page to suit their needs. We're going to use the page saved in the last movie name liquid.html as the start of an example site to build. If you're following along with the exercise files and do not already have liquid.html open in Dreamweaver from the last movie, it's located in a folder named 03_06 in the chapter three folder of your exercise files. We'll begin our customization of this page by changing some width values to better suit a wider variety of designs and make it a little more robust.

Right now, both of the columns have liquid width. Let's preview the page in Firefox to see that again. Click on the globe icon in the document tool bar and choose preview in Firefox. Narrow your browser window as you did before. You can see that both columns change in size and the sidebar gets very narrow when the window is narrow. Long words are overflowing out of the sidebar and overlapping with the main content. Fortunately we can change the design to make the side bar have a fixed width while keeping the overall layout liquid.

So close Firefox now and go back to Dreamweaver. In the CSS styles panel, click the all button and make sure that all rules are displayed under the style element. Select the fifth rule in this list that's labeled side bar one. In its properties below we can see that its width is currently set to 24 percent. Click on 24 percent and Dreamweaver will bring up two select menus. The first is for a value, so enter 200 here. The second menu is where we choose the unit of measurement for this width. Click on the arrow in the menu and choose pixels, the top option.

The width of the sidebar immediately changes in the design view of the page. Scroll down the page in design view and you can see that now the main content is wrapping underneath the bottom of the sidebar somewhat. This is because the space that the sidebar occupies is created with the left margin on this main content DIV. We need to change that left margin to match or exceed the width of the sidebar. Go back to the CSS styles panel and choose the rule for the main content DIV. It has a single property listed for margin with four values shown, one for each side of the DIV.

The first value is for the top margin, the second for the right, the third for the bottom and the fourth for the left. You can remember this order by thinking of going around a clock in clockwise manner from top all the way back up to the top. So click on the list of values and this text will become editable, change the 26 percent to 230 PX for pixels. This extra thirty pixels is there to provide space between the columns. Click outside of the rule and immediately the design view changes to show the new margin.

We now have a straight left margin on our main content like we did before. Let's preview in Firefox again to see how this has changed our page. Click on the globe icon and choose preview in Firefox. It will ask us if we want to save the changes to the page, so click yes. You can see that now the content is no longer overflowing out of the sidebar, but now the main content has less room and is overflowing. If we resize the window to make it larger, this is fixed and the sidebar doesn't change width, but this can become a problem with very narrow windows.

To avoid problems to our design at very extreme browser widths or font sizes, we can set a minimum and a maximum width for our layout. Close Firefox and go back to Dreamweaver. In the CSS styles panel, choose the container rule at the top of the all rules listing. Select the width property that is listed and simply click on the trash can item to delete this property entirely. As soon as we do this, the design adjusts to fill the entire design view. It will also now fill the entire browser window, no matter how wide or narrow, so we probably want to set a minimum and a maximum width to avoid the problems that we saw with very narrow windows having content overflow and overlap.

Still in the container rule, click on the add property link in the properties pane of the CSS styles panel. A select menu appears, begin typing M I N and then click on the arrow in the select menu and you will see a full listing of CSS properties that are available. Based on what we began to type in, Dreamweaver has jumped down the list to properties that might match. It has MIN HEIGHT selected. We're going to choose MIN WIDTH instead. Now two more boxes appear. In the first text field that Dreamweaver has placed your cursor in, type 500.

In the select menu beside it leave pixels selected as the unit of measurement. We're going to follow these same steps for setting a maximum width on this DIV. The final value that we're going to use for our maximum width is 1600 pixels, but because that's wider than our current screen, we're going to first set a value of 800 pixels just so we can preview it in the browser and make sure that it's working. So click on the add property link, type in MAX, then click the arrow in the Select menu, scroll down and choose MAX WIDTH from the list of CSS properties.

In the text field that appears, type 800 and leave pixels selected as the unit. Now let's preview our page. Click on the globe icon and select preview in Firefox. Again, when asked to save the changes, click yes. Grab the corner of your Firefox window and make the design larger. The text reflows up until a certain point and then it simply stops as if it's a fixed width design. This also happens if we narrow the window.

Try making your window more narrow. Again, the design gets less wide until it hits a certain point and snaps into a fixed width. You can add a minimum and a maximum width to your liquid layout in order to keep it flexible, but still keep it compatible with any size limitations you have on your content. One thing to note is that Internet Explorer 6 does not support the MIN WIDTH and MAX WIDTH properties. The design will still work just fine in this browser, but it won't snap to this fixed widths when it gets to narrow or too wide, it will just continue expanding or getting smaller.

If you need to have a minimum or maximum width in Internet Explorer, you'll have to use a JavaScript solution. You can search online for one of the many, free Internet Explorer MIN and MAX width scripts. For all other major browsers, adding a minimum and maximum width is a really simple and effective way to balance a user's need for flexibility with the design and content requirements for your site that might make a fully liquid design impractical. Before we customize this page any further, close Firefox. Let's go back to Dreamweaver and change the MAX WIDTH to the real value that we want, 1600 pixels.

Click on the 800 pixels shown inside the MAX WIDTH property and type 1600. The appearance of the page won't change at this point, but if testing it in a browser at a width greater than 1600 pixels, you'll see it snap to that maximum width. So in this movie, you've seen how to adapt a liquid layout to accommodate a greater range of content without overflowing or overlapping. We've made the side bar fixed in width but kept the overall layout liquid up until a certain minimum and maximum width was reached.

Show transcript

This video is part of

Image for Web Accessibility Principles
Web Accessibility Principles

68 video lessons · 25929 viewers

Zoe Gillenwater
Author

 
Expand all | Collapse all
  1. 2m 0s
    1. Welcome
      1m 3s
    2. Using the exercise files
      57s
  2. 33m 15s
    1. What does accessibility mean?
      5m 51s
    2. How does accessibility help your users?
      3m 30s
    3. Experiencing a website via a screen reader
      5m 46s
    4. How does accessibility help you and your clients?
      3m 9s
    5. Overview of Section 508 standards
      5m 51s
    6. Overview of WCAG standards
      6m 4s
    7. Understanding consistency and semantic markup
      3m 4s
  3. 54m 31s
    1. Understanding screen readers and accessibility tools
      6m 12s
    2. Getting accessible browsers
      5m 41s
    3. Customizing Firefox for accessibility testing
      5m 53s
    4. Using custom accessibility toolbars
      5m 28s
    5. Using Fangs and the Color Contrast Analyzer
      5m 30s
    6. Accessibility tools to bookmark
      5m 53s
    7. Using automated accessibility checking tools
      4m 57s
    8. Setting up the JAWS screen reader on Windows
      6m 42s
    9. Using the VoiceOver screen reader on Mac OS X
      5m 52s
    10. Setting Dreamweaver accessibility preferences
      2m 23s
  4. 26m 12s
    1. Avoiding tables for layout
      3m 30s
    2. Using CSS for layout
      2m 40s
    3. Creating a fixed-width layout
      5m 51s
    4. Creating an elastic layout
      3m 51s
    5. Creating a liquid layout
      3m 4s
    6. Customizing a liquid layout
      7m 16s
  5. 1h 6m
    1. Specifying the language
      3m 43s
    2. Setting page titles
      2m 16s
    3. Setting headings and paragraphs
      9m 55s
    4. Styling headings
      9m 56s
    5. Hiding section headings from sighted users
      6m 41s
    6. Styling text for readability
      6m 41s
    7. Ensuring proper color contrast
      6m 36s
    8. Creating text emphasis
      4m 29s
    9. Indicating quotations
      4m 29s
    10. Creating basic lists
      4m 16s
    11. Styling lists
      7m 15s
  6. 1h 15m
    1. Using lists for navigation
      6m 45s
    2. Creating a horizontal navigation bar
      13m 25s
    3. Creating a vertical navigation bar
      11m 44s
    4. Adding skip navigation links
      12m 0s
    5. Hiding skip navigation links
      6m 17s
    6. Proper link text and title attributes
      6m 11s
    7. Opening new windows
      4m 28s
    8. Accessibility limitations of fly-out menus
      6m 30s
    9. Creating an accessible fly-out menu
      8m 38s

    1. Proper ALT text for navigation images
      4m 57s
    2. Proper ALT text for decorative images
      5m 19s
    3. Adding ALT text to an existing site
      6m 9s
    4. Adding ALT text to image maps
      5m 58s
    5. Describing complex graphics
      5m 32s
  7. 34m 1s
    1. Using tables for data
      3m 0s
    2. Creating header cells
      4m 5s
    3. Adding table captions and summaries
      9m 9s
    4. Styling tables
      5m 19s
    5. Applying header cells to complex tables
      6m 52s
    6. Adding id and headers attributes
      5m 36s
  8. 42m 7s
    1. Understanding form accessibility issues
      3m 7s
    2. Labeling form fields
      6m 9s
    3. Adding fieldsets and legends
      4m 42s
    4. Moving forms out of tables
      3m 44s
    5. Cleaning up a form's appearance
      4m 53s
    6. Aligning labels and fields using CSS
      9m 39s
    7. Indicating required fields
      6m 15s
    8. Dealing with CAPTCHA
      3m 38s
  9. 7m 29s
    1. The Text-Only technique
      3m 21s
    2. The Access Keys technique
      2m 35s
    3. The Tab Index technique
      1m 33s
  10. 18s
    1. Goodbye
      18s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

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.


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.

Join now Already a member? Log in

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 Web Accessibility Principles.

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


OK
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 preferences from the dropdown menu.

Continue to classic layout Stay on new layout
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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.