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!
Problem with Repeating Background Image
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics
View previous topic :: View next topic  
Author Message
RioR



Joined: 08 Oct 2008
Posts: 3

PostPosted: Wed Oct 08, 2008 4:08 pm     Problem with Repeating Background Image Reply with quote

All of my attempts to use standard (no-repeat instructions) have failed. I cannot seem to stop the image repeating. Would love suggestions!

Here is the current code:

<body>
<table style="border-collapse: collapse;" height="298" width="692" cellspacing="0" cellpadding="5" bordercolor="#cccccc" border="1"><tbody><tr bgcolor="#ffffff"><td width="100%" valign="top" bgcolor="#ffffff" background="http://app.icontact.com/icp/loadimage.php/mogile/325776/ea4f78f09fd7226594a164afca4f416b/image/jpeg">
<div align="center"></div>


I believe the issue may actually be with the design ap (icontact - an online newsletter distribution program), but it does have a straight HTML coding option???
PayneLess Designs



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

PostPosted: Thu Oct 09, 2008 11:20 am     Reply with quote

A browser's default action is to repeat an image. That's why, when putting in background images, you should use CSS. Lots more control. Would be better if you used div tags along with CSS, but change this:

Code:
<td width="100%" valign="top" bgcolor="#ffffff" background="http://app.icontact.com/icp/loadimage.php/mogile/325776/ea4f78f09fd7226594a164afca4f416b/image/jpeg">


to this:

Code:
<td style="width: 100%" height: YYpx; vertical-align: top; background: #fff url(http://app.icontact.com/icp/loadimage.php/mogile/325776/ea4f78f09fd7226594a164afca4f416b/image/jpeg) no-repeat center scroll;">


Width/height can be set to exact image size, but I have no idea what you're doing so you can experiment with the code styling.
RioR



Joined: 08 Oct 2008
Posts: 3

PostPosted: Thu Oct 09, 2008 3:04 pm     Apreciated Reply with quote

Thanks for the reply... only this results in the image being left out all together and the page is left with a bare white background.

Would you have any other suggestions?
PayneLess Designs



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

PostPosted: Thu Oct 09, 2008 5:01 pm     Reply with quote

My mistake. Change "style="width: 100%" " to "style="width: 100%;". Quote messing up code.

Should look like this after corrected:
Code:
<td style="width: 100%; height: 433px; vertical-align: top; background: #fff url(http://app.icontact.com/icp/loadimage.php/mogile/325776/ea4f78f09fd7226594a164afca4f416b/image/jpeg) no-repeat center scroll;">


Change height value to what you need. Set width to a fixed value needed.
RioR



Joined: 08 Oct 2008
Posts: 3

PostPosted: Thu Oct 09, 2008 5:30 pm     A big step forward Reply with quote

Ok so the image is in & it is not repeating. Yeah!

One catch. It does not wish to align to the top (there is two to three lines of white, prior to the image commencing... and... something odd: after inserting your last html fix the code corrects (or in-corrects in this case) itself automatically, to look like this:

<td style="background: rgb(255, 255, 255) url(http; width: 100%; height: 433px; vertical-align: top; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">


I enter your html, the code above replaces it???
PayneLess Designs



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

PostPosted: Thu Oct 09, 2008 5:44 pm     Reply with quote

Geesh! What are you using as an editor as that code will NEVER work??????
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics 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