| View previous topic :: View next topic |
| Author |
Message |
GannMan
Joined: 03 Apr 2007 Posts: 1
|
Posted: Tue Apr 03, 2007 2:33 am |
|
|
|
hey i registered to post that i was also having problems with it aligning to the top left, heres what worked for me best. thanks for all your help.
| Code: |
<style type="text/css">
body
{
background-image: url("some image.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position:center
}
</style> |
|
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8748 Location: Castle Pines North, CO USA
|
Posted: Tue Apr 03, 2007 3:41 am |
|
|
|
|
Using the CSS shorthand might be better as well. Since CSS is cascading, some browsers will wipe out the image if they see a background color. And a color should be used just in case people cannot download images / or choose not to download images.
_________________
Corey
Toll Free Fax Numbers | Mile High Merchant Accounts |
|
Keikura

Joined: 24 Mar 2007 Posts: 167 Location: U.K.
|
Posted: Tue Apr 03, 2007 11:18 am |
|
|
|
The cascade effect will only work if he sets the background-color attribute for the body later on.
Currently there is no chance of it being overridden.
Plus shorthand is not always best especially when you have a lot of values set and its easier to read than it being all on one line.
Things like border's can be one line if they're the same all round. E.g.
| Code: |
border: 1px solid #000000;
/* then you can override say the bottom border rather than set all four border' individually */
border-bottom:3px solid #FF9966; |
|
|
celeste
Joined: 19 May 2007 Posts: 2
|
Posted: Sat May 19, 2007 12:59 pm 2 backgrounds |
|
|
|
| so what im trying to do is put a main background that repeats and then a 2nd image in the middle of the background but all as a background? im so confused. i need a code that helps im kin a new to all this |
|
celeste
Joined: 19 May 2007 Posts: 2
|
Posted: Sat May 19, 2007 1:00 pm 2 backgrounds |
|
|
|
| so what im trying to do is put a main background that repeats and then a 2nd image in the middle of the background but all as a background? im so confused. i need a code that helps im kin a new to all this im trying to do this for a journal thats called blurty |
|
Corey Bryant Site Admin

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

Joined: 24 Mar 2007 Posts: 167 Location: U.K.
|
Posted: Sat Sep 08, 2007 10:18 am |
|
|
|
Or more simply:
| Code: |
div.bga {
background-image:url(path/to/image1.jpg);
width:500px;
height:500px;
}
div.bgb {
background-image:url(path/to/image2.jpg);
width:250px;
height:250px;
}
. . . . .
<div class="bga" align="center">
<div> class="bgb"> . . . </div>
</div> |
|
|
Attilapele
Joined: 02 Feb 2008 Posts: 2
|
Posted: Sat Feb 02, 2008 12:58 pm hey :) |
|
|
|
i need a little help here...i'm a beginer so...
i want to center my background and don't reply.
but i want that i could scroll down until the end of my background picture, then end of my background pic...how can i make that?
please help!
thx |
|
Attilapele
Joined: 02 Feb 2008 Posts: 2
|
Posted: Sat Feb 02, 2008 1:02 pm |
|
|
|
| so don't be fixed...just in the center of the monitor and don't be repeated |
|
spaige08
Joined: 08 Feb 2008 Posts: 4
|
Posted: Fri Feb 08, 2008 10:15 am Tried HTML & CSS coding to freeze and not repeat backgro |
|
|
|
| Okay, I read thru the thread and tried every coding suggested and either my background image is tiled (with the HTML coding) or it doesn't appear at all with the CSS coding. I am copying everything and all I get is a white background instead of the image... what am I doing wrong? |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8748 Location: Castle Pines North, CO USA
|
|
spaige08
Joined: 08 Feb 2008 Posts: 4
|
Posted: Fri Feb 08, 2008 10:33 am Here is my code |
|
|
|
Maybe I am placing it in the wrong spot...
I have my title and the metatags and then:
<style type="text/css">
body
{body-background:"http://www.stephenlasararchitects.com/nancylasar/Westover 031.jpg";
background-repeat:no-repeat
background-position:center;
background-attachment:fixed}
</style>
<table border=1 width=600px cellpadding=0 cellspacing=0 align=center> |
|
madprof
Joined: 26 Jan 2008 Posts: 98
|
Posted: Fri Feb 08, 2008 11:24 am |
|
|
|
Replace body-background with background-image
body-background isn't a CSS instruction.
Hope this helps! |
|
spaige08
Joined: 08 Feb 2008 Posts: 4
|
Posted: Fri Feb 08, 2008 12:25 pm Thank you |
|
|
|
I finally got it to work... now that I know what to do I am going to play around with the image since I want text above it to be read.
Last Question... do you think a vertical image works better then a horizontal? Square image? I am trying to consider all monitor types. Thanks! |
|
madprof
Joined: 26 Jan 2008 Posts: 98
|
Posted: Fri Feb 08, 2008 12:34 pm |
|
|
|
Unobtrusive, stylish, easy to read text over etc.
If it fits those then few people will care if it is portrait or landscape.  |
|
|