Home arrow Style Sheets arrow Page 3 - Using Background Images when Matching Web Page Columns with CSS
STYLE SHEETS

Using Background Images when Matching Web Page Columns with CSS


Building web pages that display completely even main columns is sometimes a pretty cumbersome task. However, if you're a web designer interested in learning how to achieve this neat visual effect with your own web sites using a CSS-based approach, then this series might fit your needs. Keep reading to learn more.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 6
July 24, 2007
TABLE OF CONTENTS:
  1. · Using Background Images when Matching Web Page Columns with CSS
  2. · Reviewing some earlier concepts
  3. · Adding some rounded corners to a web document
  4. · Listing the complete source code for the rounded-corners example

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using Background Images when Matching Web Page Columns with CSS - Adding some rounded corners to a web document
(Page 3 of 4 )

As I mentioned in the previous section, having already defined a fixed web page layout that displays its corresponding columns completely evened, I'm going to add a rounded corners effect to the web document in question, logically keeping its initial structure untouched.

You're probably asking yourself the following question: how can a rounded corners effect be incorporated into the existing web page layout? Well, this procedure is actually very straightforward. It consists of specifying a background image for the generic wrapper DIV that contains the respective columns of the web document.

Given that, this background image might look similar to the one shown below:

As you can see, the previous background image has been created to achieve a rounded corner effect in the left- and right-positioned columns of the previous web document. Of course, in this case the image in question can be used only with fixed layouts, and certainly not with liquid ones, but it does show in a nutshell how a fully-balanced web page can be spiced up with some basic rounded corners. Pretty simple, right?

And finally, the CSS code required to include the above background picture into the respective main wrapping DIV of the sample web page is the following:

#mainwrapper{
   clear: both;
   width: 800px;
   height: 100%;
   margin-left: auto;
   margin-right: auto;
   overflow: hidden;
   background: #eee url(roundedbg.gif) center bottom no-repeat;
}

All right, at this stage I showed you a simple procedure for including a few rounded corners into an existing, fully-leveled web page layout. Therefore, I'm now going to show you the complete source code corresponding to the web page in question, so you can grasp more clearly how the previously defined background image fits into the overall (X)HTML structure.

As you might suppose, this code listing will be shown in the next section, thus go ahead and keep reading.


blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials