Image bAckground of a division

This is a discussion on "Image bAckground of a division" within the Web Page Design section. This forum, and the thread "Image bAckground of a division are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 31st, 2006, 14:58
Junior Member
Join Date: Aug 2006
Location: Jordan
Age: 22
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Question Image bAckground of a division

Can I add an image as a background of a paragraph or division? Knowing that this division is floating on other division.
I've tried this but it didn't work...

div.webscope {background:Images/Sydney2.jpg no-repeat; width="600"; height="450"; margin-top=5%}

There is no proplem with keeping the url of the img that way as long as it is in the same webfolder, right?
Reply With Quote

  #2 (permalink)  
Old Aug 31st, 2006, 15:08
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,738
Blog Entries: 1
Thanks: 0
Thanked 16 Times in 16 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Image bAckground of a division

background:Images/Sydney2.jpg no-repeat; width="600"; height="450"; margin-top=5%

is not right. It should be.

div.webscope {background:url(../Images/Sydney2.jpg) no-repeat top left; margin:5% 0 0 0;}

As for the width and height you can set the width and height on the div or the paragraph depending on your needs.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #3 (permalink)  
Old Aug 31st, 2006, 15:09
Reputable Member
Join Date: Jul 2005
Posts: 400
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image bAckground of a division

If this is exactly what you have in the css then your problem is syntax. You have everything incorrectly entered.

Code: Select all
div.webscope {
 background: Images/Sydney2.jpg no-repeat;
 width="600";
 height="450";
 margin-top=5%
}
Should be

Code: Select all
 
div.webscope {
 background: url('Images/Sydney2.jpg')  no-repeat;
 width: 600px;
 height: 450px;
 margin-top: 5%;
}
It's also a good habit to only use lowercase folder and filenames.

Last edited by mreine; Aug 31st, 2006 at 15:13.
Reply With Quote
  #4 (permalink)  
Old Aug 31st, 2006, 15:54
Junior Member
Join Date: Aug 2006
Location: Jordan
Age: 22
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image bAckground of a division

Thank you guys, it worked properly.
Reply With Quote
Reply

Tags
image, background, division

Thread Tools

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
Division alignment problem Craigj1303 Web Page Design 0 Apr 3rd, 2008 14:29
Division Jack Franklin Databases 0 Mar 26th, 2008 17:46
how they do the background image act like that ? marSoul Webforumz Cafe 11 Nov 10th, 2007 19:18
Background image overlaping footer image at bottom of div lw_d Web Page Design 4 Mar 21st, 2006 00:27
Need help with my background image!!! courtjester Web Page Design 3 Sep 30th, 2003 15:25


All times are GMT. The time now is 19:25.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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