Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 29th, 2007, 05:18 PM
Authorized User
 
Join Date: Mar 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kennethjaysone Send a message via Yahoo to kennethjaysone
Default background-position:?

I have a gif image that will be used for the navigation background. The image has a height of 400 pixels and a width of 206 pixels.

In this tutorial, we are asked to input the following CSS rules:


#navigation a {
                text-decoration: none;
                text-transform: uppercase;
                display: block;
                background: url(assets/tabs.gif) 0-195px no-repeat;
                width: 200px;
                height 24px;
                color: #6b96b3;
                padding-left: 10px;
                padding-top: 11px;
                }

#navigation a:hover {
                    background-position: 0-300px;
                    padding-top: 6px;
                    height: 29px;
                    }


I do not understand the background-position: rule?

0-300px; ? 0-195px; ? what do these values mean?

Thank you all in advance for your thoughts and views.

Kenneth

 
Old December 30th, 2007, 01:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

It's plain wrong. Is it written exactly like that? With a space after the first number, like so: '1 -195px', it would mean a negative vertical offset.

http://www.w3.org/TR/CSS2/colors.htm...round-position

What tutorial are you following?

--
http://yupapa.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the position of the mouse sbkrohit CSS Cascading Style Sheets 4 November 5th, 2008 04:56 PM
Position barski XSLT 5 July 11th, 2007 01:54 PM
mouse position angelboy C# 2005 0 April 9th, 2007 04:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.