Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Member #
    38057

    Exclamation My css sprite does not seem to be working

    Hello all, I am new here and just learning to code a website, so far I had hit a snag. When I try to use my
    HTML Code:
    background: url(../images/sprite.png)
    it does not seem to work, I got it to work on my navigation bar, but when I try to do it on my billboard section area it does not want to work with me at all. Here is my HTML


    HTML Code:
        <!--Header-->
    <div id="container_header">
    
    <div id="container_header2">
    
    <div id="ram_logo">
        <a href="#">
        	<img src="images/ram_logo.png" border="0" alt="logo" />
        </a>
    </div>
    
    <div id="menu">
        <ul>
            <li id="features"><a href="#"><span>Features & Specs</span></a></li>
            <li id="photos"><a href="#"><span>Photo Gallery</span></a></li>
            <li id="brochure"><a href="#"><span>Brochure</span></a></li>
            <li id="getaquote"><a href="#"><span>Get A Quote</span></a></li>
        </ul>
    </div>
    
    <div class="clear">
    
    </div>
    </div>
    </div>
    
    <!--end header-->
    
    <!--billboard-->
    <div id="container_billboard">
    
    <div id="truck_home">
    
    </div>
    
    <div id="billboard_title">
        <p id="title_allnew">THE ALL NEW</p>
        <p id="title_ram">2013 Ram 1500</p>
        <p id="title_laramie">Laramie Longhorn </p>    
        <p id="title_starting">Starting at</p>
        <p id="title_price">$20,500</p>
        <div class="clear"></div>
        <div id="title_getaquote">
            <a href="#">
            </a>
        </div>
    </div>
    
    <div class="clear">
    </div>
    </div>
    <!--end billboard-->


    now the elements I am wanting to target are:
    HTML Code:
    <div id="truck_home">
    and
    HTML Code:
    <div id="title_getaquote">
            <a href="#">
            </a>
        </div>
    here is my css:
    Code:
    /*billboard*/
    #container_billboard {
    	margin: 0 auto;
    	width: 960px;
    	}
    #truck_home {
    	background-image: url(/images/sprite.png) no-repeat 0px -69px;
    	margin-top: -20px;
    	margin-right: -150px;
    	float: right;
    	height: 293px;
    	width: 655px;
    
    	}
    #billboard_title {
    	width: 387px;
    	position: absolute;
    	float: left;
    	height: 225px;
    	margin-top: 58px;
    	margin-left: auto;	
    	max-width: 100%;
    
    }
    #title_allnew {
    	font-family: 'Arimo', sans-serif;
    	font-weight: regular;
    	font-size: 20px;
    	color: #888888;
    	margin-left: 65px;
    	margin-bottom: 5px;
    	}
    #title_ram {
    	font-family: 'Arimo', sans-serif;
    	font-weight: 800;
    	font-size: 45px;
    	color: #FFFFFF;
    	text-align: left;
    	margin-bottom: 5px;
    	margin-left: 35px;
    	}
    #title_laramie {
    	font-family: 'Arimo', sans-serif;
    	font-weight: 800;
    	font-size: 28px;
    	color: #888888;
    	text-align: left;
    	margin-bottom: 12px;
    	margin-left: 85px;
    	}
    #title_starting {
    	font-family: 'Arimo', sans-serif;
    	font-weight: 400;
    	font-size: 13px;
    	color: #767576;
    	margin-left: 130px;
    	margin-bottom: -15px;
    	}
    #title_price {
    	font-family: 'Quicksand', sans-serif;
    	font-weight: 300;
    	font-size: 38px;
    	color: #FFFFFF;
    	text-align: left;
    	margin-left: 195px;
    	}
    #title_getaquote {
    	background-image: url(/images/sprite.png) no-repeat -163px -365px;
    	text-align: left;
    	margin-top: 20px;
    	margin-left: 165px;
    	}
    so I am not sure what I am doing wrong here, I tried doing
    Code:
    background-position: 0 0
    please can anyone help me?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Where's the page? It's hard to say just from that code. Looks right in theory, but there's often something else interfering or something else we don't see just from the code.

    Upload it somewhere and share the link, please and thanks.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Member #
    38057
    you mean the sprite page?

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Yes, the sprite page.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:02 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com