HTML Help Forum HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Background help
Post a Reply to this Topic Ask a New Question Goto page 1, 2  Next
Click here to go to the original topic
       HTML Help Forum -> General HTML
View previous topic :: View next topic  
Author Message
Codypaul1



Joined: 09 Jun 2004
Posts: 2

Posted: Wed Jun 09, 2004 12:38 pm     Background help  

what is the code for background?


Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Wed Jun 09, 2004 3:10 pm      

You can use something as simple as in the opening body tag:
Code: <body bgcolor="#FF0000">
for a solid color. or did you want to use an image or CSS?
Codypaul1



Joined: 09 Jun 2004
Posts: 2

Posted: Wed Jun 09, 2004 5:56 pm      

An image
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Wed Jun 09, 2004 5:59 pm      

You can use:
Code: <body background="images/background.jpg">
geordie04041979



Joined: 30 Jun 2004
Posts: 7

Posted: Wed Jun 30, 2004 9:16 pm      

You can also use style sheet for this method. Define the following code in your style sheet:

<body style="background: url(bg.gif) white">

or

<style type="text/css">
<!--
body { background: url(bg.gif) white }
-->
</style>

or

in external style sheet:

body { background: url(bg.gif) white }

If you're new to css a good place to get started is http://www.htmlhelp.com/reference/css


Webmaster:
http://www.freewebs.com/geordie04041979
DCCS - The Apprentice



Joined: 12 Jul 2004
Posts: 68
Location: DC

Posted: Mon Aug 02, 2004 12:59 pm      

what about stopping an image from tiling. I used to know :/ anyways, I got a pic I'd like to be in the background, but being it's size, it tiles. I would rather not have to use javascript, cause I know I can do it using it.
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Mon Aug 02, 2004 1:26 pm      

DCCS - The Apprentice wrote: what about stopping an image from tiling. I used to know :/ anyways, I got a pic I'd like to be in the background, but being it's size, it tiles. I would rather not have to use javascript, cause I know I can do it using it.
You can try:
Code: <style type="text/css">
body
{
background-image: url("/images/background.jpg");
background-repeat: no-repeat
}
</style>
or maybe:
Code: <style type="text/css">
body
{
background-image: url("/images/background.gif");
background-repeat: no-repeat;
background-position: center center
}
</style>
DCCS - The Apprentice



Joined: 12 Jul 2004
Posts: 68
Location: DC

Posted: Tue Aug 03, 2004 4:49 am      

Quote: background-position: center center


css, good call ;) anyways, you have center listed twice there. curious on why you did that (and you forgot your semi-colon:))? I mean, is there two areas two which you need it to be specified as being in the center?
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Tue Aug 03, 2004 5:04 am      

The last semi-colon - it is not needed since there it not another line. At least when I get my CSS coding from a buddy of mine, it is there sometimes & sometimes not.

The center center - tells it to center it from the left & right and top & bottom. You can also use: top left, top center, top right, etc.
DCCS - The Apprentice



Joined: 12 Jul 2004
Posts: 68
Location: DC

Posted: Tue Aug 03, 2004 6:17 am      

alright cool deal. thats what I thought. now what about having it not tile within the background of a table. I'm sure it's as easy as telling it's properties to 'fixed' but I don't know which pairs to use and in what order (such as, "" or '' or parenthesis).
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Tue Aug 03, 2004 6:25 am      

Well you really should use a DIV. Something like:
Code: #container
{
   width: 799px;
   background: url('../images/main_back.gif') repeat-y top left;
}
DCCS - The Apprentice



Joined: 12 Jul 2004
Posts: 68
Location: DC

Posted: Thu Aug 05, 2004 9:40 am      

hmm, well I'm very unfamilier with div. suppose you could give a reference site perhaps or a tutorial site to which I could check it out? :D
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Thu Aug 05, 2004 9:42 am      

There are a number of sites that have premaid "basic" CSS layouts:
http://www.inknoise.com/experimental/layoutomatic.php
http://www.glish.com/css/
http://www.thenoodleincident.com/tutorials/box_lesson/boxes.html
http://www.bluerobot.com/web/layouts/

This seems to have them categorized fairly well.
http://www.ssi-developer.net/main/templates/

These might help you as a start.
DCCS - The Apprentice



Joined: 12 Jul 2004
Posts: 68
Location: DC

Posted: Thu Aug 05, 2004 9:44 am      

alright, thanks a lot bro.
DCCS - The Apprentice



Joined: 12 Jul 2004
Posts: 68
Location: DC

Posted: Thu Aug 05, 2004 9:47 am      

also though, what's the line to make the background static, in css?
maybe, background-properties: static; ?
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum -> General HTML Goto page 1, 2  Next
Page 1 of 2


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group