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.



 Subscribe in a reader

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

Notices


Reply
 
LinkBack Thread Tools
  #1  
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 31st, 2006, 15:08
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
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.
__________________

Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
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.
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

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:08.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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