HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Background Image with CSS
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
kristen16



Joined: 26 May 2008
Posts: 5

PostPosted: Mon May 26, 2008 11:06 am     Background Image with CSS Reply with quote

I'm working on a website, http://www.sunshinesolarservices.com/, but a lot of the css isn't working. The background images for all of the second row isn't working (the images there aren't the backgrounds).
You can see an example here: http://www.sunshinesolarservices.com/text.php
As you scroll down, the images don't go all the way to the bottom. How do i fix this?
Straystudio



Joined: 14 Apr 2008
Posts: 261
Location: Nord Italy

PostPosted: Mon May 26, 2008 3:06 pm     Both percentuage and pixel sizing IMG Element Reply with quote

Enter:

height="100%" width="34"

in the IMG tag You have at the very bottom of Document, so:
Code:

<td class="B7" vAlign="top" width="34" colspan="1"><img height="100%" width="34" src="images/slices/sliceB_15.jpg" border="0" alt=""></td>
</body></html>


and let me know if this is what You are intended to achieve.


Lacks one closing } at the beginning of Your Sheet, where links start:

body {
background-color:#FFFFFF;
margin:0px 0px 0px 0px;
scrollbar-face-color:#FFFFFF;
scrollbar-shadow-color:#055200;
scrollbar-darkshadow-color:#000000;
scrollbar-highlight-color:#FFFFFF;
scrollbar-3dlight-color:#055200;
scrollbar-track-color:#FFFFFF;
scrollbar-arrow-color:#055200;
color:#000000;
 }

a:link, a:active, a:visited, a: hover {
color:#105006;
 }
 
kristen16



Joined: 26 May 2008
Posts: 5

PostPosted: Tue May 27, 2008 1:05 pm     Reply with quote

Oh my goodness! Thank you soooo much! It works now :]
quartzy



Joined: 26 Dec 2007
Posts: 405

PostPosted: Wed May 28, 2008 12:27 pm     re Reply with quote

looked at your site and the alignment is out in FF. Guess your'e aware of this.
kristen16



Joined: 26 May 2008
Posts: 5

PostPosted: Fri May 30, 2008 8:40 pm     Reply with quote

you guys can close this topic when you like :] thanks soo much!
Dyami



Joined: 20 Jul 2008
Posts: 30

PostPosted: Wed Jul 30, 2008 10:53 pm     Reply with quote

sorry i am late.
In css you can create class like
.h
{
background:url(" ");
or
background: white;
}
and then use this class anywhere, It will create background.

________________________________________
web design company
free templates
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1289
Location: Biloxi, MS

PostPosted: Thu Jul 31, 2008 4:41 pm     Reply with quote

Dyami wrote:
sorry i am late.
In css you can create class like
.h
{
background:url(" ");
or
background: white;
}
and then use this class anywhere, It will create background.


The proper way for inserting a background image and color is to use the shorthand method.

Tiled image -

For contents to scroll over background image:

tag/class/ or selector name {
background: #fff url(URL to image) repeat fixed;
}

For contents to scroll WITH background image:

tag/class/ or selector name {
background: #fff url(URL to image) repeat scroll;
}

For non-tileable images inside a container -

For contents to scroll over background image:

tag/class/ or selector name {
width: XXpx;
height: YYpx;
margin: 0 auto;
background: #fff url(URL to image) no-repeat center fixed;
}

For contents to scroll WITH background image:

tag/class/ or selector name {
width: XXpx;
height: YYpx;
margin: 0 auto;
background: #fff url(URL to image) no-repeat center scroll;
}

Of course, there are lots more options on positioning image inside the container and whether you want container to be centered, too (margin: 0 auto;). Same for the background color from white (#fff).

Do not use named colors. Some color names do not yield the color you expect in browsers. Some named colors have the same hex color code.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial