There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
bios black screen blue screen boot computer connection crash css dell display driver drivers email error excel firefox firefox 3 freeze game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem router slow sound startup trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
CSS background repeat question


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
InfectioN's Avatar
Senior Member with 148 posts.
 
Join Date: Oct 2004
Experience: Beginner
31-Mar-2005, 05:31 PM #1
CSS background repeat question
i have an image on the left and want the background to it.. to repeat across the screen. here is the code i have so far, but it doesnt seem to be working.

this is the CSS external

#banner {
float: left;
margin: 0px;
padding: 0px;
background-image:url (sigma/yellow.gif);
background-repeat:repeat-x;}

this is the html

<div id="banner">
<img src="corner.gif" class="curve" alt="">
</div>

i have two gif files. the corner.gif and the yellow.gif (1 x 26 px). the yellow.gif is the one that i want to repeat across the screen.

i have both of them in the sigma folder on my desktop. the corner.gif is showing up.. but the yellow.gif isnt. what am i doing wrong?
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
31-Mar-2005, 06:47 PM #2
Well, if the corner.gif shows up and you have have the corner.gif in the sigma folder, then your html file must be in the sigma folder too. If so, then to load yellow.gif (if it is also in the sigma folder), you'd use

background-image: url('yellow.gif');
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
InfectioN's Avatar
Senior Member with 148 posts.
 
Join Date: Oct 2004
Experience: Beginner
31-Mar-2005, 07:59 PM #3
here is the complete code. this is really annoying me.

i put the external code in with the html.

-----------------------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>

<style type="text/css" media="all">

body {background-color: #993233}

#topborder{
margin: 0px;
padding: 0px;
height:110px;
width:auto;
background-color: #993233;}

#banner {
float: left;
margin: 0px;
padding: 0px;
background-image: url('yellow.gif');
background-repeat:repeat-x;
}

</style>

</head>
<body>

<div id="topborder">
Content Content

</div>
<div id="banner">
<img src="corner.gif" class="curve" alt="">
</div>

</body>
</html>
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
31-Mar-2005, 08:23 PM #4
That should work. The image should repeat across the entire banner div. You don't have a width set for the banner div though so the div will only be as wide as corner.gif.
InfectioN's Avatar
Senior Member with 148 posts.
 
Join Date: Oct 2004
Experience: Beginner
31-Mar-2005, 09:16 PM #5
ahhhhhhhhh

nice

i had done

width: auto;

but it didnt work. so i ruled that out

is that the wrong code? for it the auto all the way across?

i just used width: 200px; and it worked
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
31-Mar-2005, 09:31 PM #6
width: 100%;
InfectioN's Avatar
Senior Member with 148 posts.
 
Join Date: Oct 2004
Experience: Beginner
31-Mar-2005, 10:22 PM #7
ahhhhhh

thx for the help shadow
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:27 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.