Forum Topic: Html Question: Just One Background

(264 views • 7 replies)

This topic is 1 page long.

<< < > >>
None

Jun

Reply To Post Reply & Quote

Posted at: 11/14/05 04:24 AM

Jun NEUTRAL LEVEL 10

Sign-Up: 01/12/04

Posts: 2,704

I'll use Newgrounds as an example.

I want to have just one image as the background without it tiling downwards. For example, look at the Grey, Yellow box, then faded grey on the Newgrounds pages.

Is it possible to make the page so that the background only tiles horizontally at the top? (I'll design it so it flows into the background colour chosen for the page)

I'm not sure how to word this question, but I'll throw another page into the story. Go look at the World of Warcraft page. Notice how they use the background image at the top and then it fades to black, where I imagine they'd just use a simple colour as the background instead of an image to save up on time taken for the page to load.

How would I achieve this effect? Do I have to make an underlying table or is there a way to get this through some background code?

I never covered this type of stuff in my short HTML section I did in my CS: Software Design/programming course.

Any help would be greatly appreciated. My apologies if I never got my point through.


None

Jessii

Reply To Post Reply & Quote

Posted at: 11/14/05 08:04 AM

Jessii DARK LEVEL 33

Sign-Up: 02/10/05

Posts: 8,640

They did a gradient with a diagonal pattern overlay. I don't really know how they did it so that it stretches without it repeating.


None

<deleted>

Reply To Post Reply & Quote

Posted at: 11/14/05 12:59 PM

At 11/14/05 08:04 AM, Jessicasso wrote: They did a gradient with a diagonal pattern overlay. I don't really know how they did it so that it stretches without it repeating.

It doesn't stretch out; the bottom of the image, where the faded color ends, is the same color as the background, to give the effect of a stretch.

The BG image used on NG.

I don't really know how to do this, so I'm going to wait for a responce with you, Jun_.


None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 11/14/05 01:02 PM

Afro-Ninja EVIL LEVEL 35

Sign-Up: 03/02/02

Posts: 13,171

It's a background division. The background color of the div is the gray you see at the bottom. The image itself is the sliver that was posted above, repeated along the x axis at the top of the div

BBS Signature

None

<deleted>

Reply To Post Reply & Quote

Posted at: 11/14/05 01:04 PM

At 11/14/05 01:02 PM, Afro_Ninja wrote: It's a background division. The background color of the div is the gray you see at the bottom. The image itself is the sliver that was posted above, repeated along the x axis at the top of the div

How do I go about using <div align> in this case, if I do at all?


None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 11/14/05 01:21 PM

Afro-Ninja EVIL LEVEL 35

Sign-Up: 03/02/02

Posts: 13,171

At 11/14/05 01:04 PM, PantherLock wrote:
At 11/14/05 01:02 PM, Afro_Ninja wrote: It's a background division. The background color of the div is the gray you see at the bottom. The image itself is the sliver that was posted above, repeated along the x axis at the top of the div
How do I go about using <div align> in this case, if I do at all?

I can't remember exact syntax off the top of my head but it goes something like:

<div class="background">

//then, in your stylesheet

div.background{
background-color:gray;
background-image: url('/graphics/header.gif');
background-repeat: repeat-x;
background-position: top left;
}

I'm thinking that some of those can be combined together, but like I said I'm not too sure. That's the basic idea though.

BBS Signature

None

Bizarro

Reply To Post Reply & Quote

Posted at: 11/14/05 04:17 PM

Bizarro NEUTRAL LEVEL 22

Sign-Up: 12/06/02

Posts: 651

At 11/14/05 01:21 PM, Afro_Ninja wrote:
At 11/14/05 01:04 PM, PantherLock wrote:
At 11/14/05 01:02 PM, Afro_Ninja wrote: It's a background division. The background color of the div is the gray you see at the bottom. The image itself is the sliver that was posted above, repeated along the x axis at the top of the div
How do I go about using <div align> in this case, if I do at all?
I can't remember exact syntax off the top of my head but it goes something like:

<div class="background">

//then, in your stylesheet

div.background{
background-color:gray;
background-image: url('/graphics/header.gif');
background-repeat: repeat-x;
background-position: top left;
}

I'm thinking that some of those can be combined together, but like I said I'm not too sure. That's the basic idea though.

You dont really need a div for this, you can just put it in body, and its all good

body{
background:#000000 url('http://www.url-of-img') repeat-x;
}

BBS Signature

None

Jessii

Reply To Post Reply & Quote

Posted at: 11/14/05 04:55 PM

Jessii DARK LEVEL 33

Sign-Up: 02/10/05

Posts: 8,640

At 11/14/05 04:17 PM, Bizarro wrote: body{
background:#000000 url('http://www.url-of-img') repeat-x;
}

makes sense to me


All times are Eastern Standard Time (GMT -5) | Current Time: 11:54 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!