How do I make a background image to resize to the containing element?
Check out the rounded corners of the main tabs on this site These background images are 440px wide and yet it adjusts to the contained element without losing the rounded edges.
source to share
It looks like the list item and anchor have the same background image, only at different offsets.
The image is set as the background for each of these elements. The anchor is set to display the left side of the image, while the list item is set to the rightmost right side, with the right padding wide enough for the image to peek in. This method is known as sliding doors. Here are the links compiled from other answers :
- A List Apart Sliding Doors Part 1
- A List Apart Sliding Doors Part 2
- A CSS2 tutorial
- A CSS3 Tutorial
Thank Mariuz and of Darko the Z .
source to share
There are several tutorials on rounded corners on the net.
With CSS2, you can try this: CSS2 Tutorial
If you want to use CSS3: CSS3 Tutorial
A simple Google search for rounded corners will give you many helpful guides.
source to share