Web Design and Development Forums

CSS background image not using body

This is a discussion on "CSS background image not using body" within the CSS Forum section. This forum, and the thread "CSS background image not using body are both part of the Design Your Website category.


Go Back   Webforumz.com > Design Your Website > CSS Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 25th, 2008, 11:15   #1 (permalink)
Reputable Member
 
Join Date: May 2007
Location: Margate
Age: 24
Posts: 156
CSS background image not using body

Good Morning,
I am trying to set a background image for my website.

When using the body tag it is fine as it adjusts to fit different screen sizes.
body {
background-image: url(bg_main.gif);
background-position: center top;
background-repeat: no-repeat;
margin: 0px;
}
But I dont want to use the body, I have tried using a div and it only goes as far as the content in it.
#bkgd {
background-image: url(bg_main.gif);
background-position: center top;
background-repeat: no-repeat;
margin: 0px;
}

Can anyone help

regards

Daniel
R8515198 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 25th, 2008, 12:35   #2 (permalink)
Up'n'Coming Member
 
Join Date: Mar 2008
Location: Chester, UK
Age: 17
Posts: 88
Re: CSS background image not using body

Can i ask why you don't want to use the body attribute?

Something like this

Code: Select all
#bkgd {
                position: relative;
                background-image: url(images/novus_13.png);
                height:100%;
                }
Will expand it to the pages dimensions but as soon as you scroll down it won't repeat..

I don't understand the purpose of not using the body attribute?

Last edited by Bocaj; Apr 25th, 2008 at 12:50.
Bocaj is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 26th, 2008, 17:17   #3 (permalink)
Reputable Member
 
Join Date: May 2007
Location: Margate
Age: 24
Posts: 156
Re: CSS background image not using body

My work uses Perl and it auto loads a css sheet that I cant change due to it being a central CSS, forced down to all subsites. At the moment everyone is using tables, and as i have learnt CSS i dont want to use tables and want to show what can be done using CSS.

The forced CSS only uses body and forces a header

So the forced BODY overides any body I put in.

I hope that explains it a little better.

Bocaj I will try the above tonight and will put a reply on with the out come

Cheers Daniel
R8515198 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 26th, 2008, 17:51   #4 (permalink)
Reputable Member
 
Join Date: May 2007
Location: Margate
Age: 24
Posts: 156
Re: CSS background image not using body

The above didnt work, as it only goes as far as the div size inside it. I think if I made a class that fills till the footer. I cant explain what I am trying to say I saw it in one of my books will have a read and write back.
R8515198 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fading the content div into the body background-image? lmc148 CSS Forum 5 Jan 16th, 2008 05:22
[SOLVED] Aplying back ground image/s to body Oak HTML Forum 3 Jan 6th, 2008 19:55
asp.net embedded image in body help peebman2000 ASP.NET Forum 1 May 31st, 2007 17:13
Background image overlaping footer image at bottom of div lw_d CSS Forum 4 Mar 21st, 2006 00:27
Background Image jwalker80 HTML Forum 2 Dec 22nd, 2005 14:52



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 18:24.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59