Solved

Background image repeat issue.

Posted on 2008-06-10
6
198 Views
Last Modified: 2010-04-21
Hi experts,

The FreestyleChronicle.php page I have supplied has several types of content to display. To do this I have used a javascript called tabbed content from Dynamic Drive. There are three 'tabs' which are essentially nested div tags that contain background image graphics/text/photo/video content. Both the text and video tabs are working correctly, however, the photo tab won't display and repeat (y axis) the background graphic:

style="background-image:url(images/ChronGraphics/MainChronBG_r2_c1.jpg);

the full length of the div.
The photos are being called dynamically with php and this seems to stop the div.
Strangely, if I add a height attribute to the div that contains the photo tab the graphic repeats as required. The problem with this, is that when there is only one photo present the rest of the space is blank and alludes to the page loading being incomplete.

I know that this must be a simple fix, but I have been scouring my code for ages and just can't see the problem.

Any help is greatly appreciated!
0
Comment
Question by:RowdyBurns
  • 3
  • 3
6 Comments
 
LVL 9

Expert Comment

by:zemond
ID: 21757044
Im going to guess that the images in the photos tabbed are floating, you need to clear the float after the images are outputted inside the div that requires repeat-y do <div style="clear:both;"></div>
0
 

Author Comment

by:RowdyBurns
ID: 21758067
Thanks for the response Zemond. I have tried your suggestion but unfortunately it hasn't worked.
Here is the code that styles the photos.
Can you suggest anything else that might be causing it?
*

{

	border: 0;

	margin: 0;

	padding: 0;

}
 

/* =Basic HTML, Non-essential

----------------------------------------------------------------------*/
 
 
 

/* =Hoverbox Code

----------------------------------------------------------------------*/
 

.hoverbox

{

	cursor: default;

		

	

}
 

.hoverbox a

{

	cursor: default;

}
 

.hoverbox a .preview

{

	display: none;

}
 

.hoverbox a:hover .preview

{

	display: block;

	position: absolute;

	top: -33px;

	left: -45px;

	z-index: 1;

	

}
 

.hoverbox img

{

	background: #fff;

	border-color: #aaa #ccc #ddd #bbb;

	border-style: solid;

	border-width: 1px;

	color: inherit;

	padding: 2px;

	vertical-align: top;

	width: 100px;

	height: 75px;

	

}
 

.hoverbox li {

background: #eee;

border-color:#DDDDDD rgb(187, 187, 187) rgb(170, 170, 170) rgb(204, 204, 204);

border-style:solid;

border-width:1px;

color:inherit;

display:inline;

float:left;

margin:3px;

padding:5px;

position:relative;

}
 

.hoverbox .preview

{

	

	width: 200px;

	height: 150px;

}

Open in new window

0
 
LVL 9

Accepted Solution

by:
zemond earned 500 total points
ID: 21758170

-- FIND

<ul class="hoverbox" style="clear:both;">

        

                <li><a href="http://www.randomlychallenged.com/./users/aman/Challenge/25/images/aman_25_img_1.jpg"  target="page"  onclick="window.open('','page','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,left=50,top=50, height=300, width=400, titlebar=no')" title="Matt - add the image echo here" ><img src="./users/aman/Challenge/25/images/aman_25_img_1.jpg" alt="Photo" /><img src="./users/aman/Challenge/25/images/aman_25_img_1.jpg" alt="Photo" class="preview" /></a></li>

              </ul>
 

-- AFTER ADD

<div style="clear:both"></div>
 
 
 

IF that dosnt work add another <li> to the ul like this
 

<li style="clear:both;"></li>

Open in new window

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:RowdyBurns
ID: 21758224
,Awesome,Awesome,Awesome!! Thanks for that. I wouldn't have got that in a month of Sundays!
Cheers zemond and have a good day!
0
 

Author Closing Comment

by:RowdyBurns
ID: 31465944
Fast response and excellent knowledge. Thanks
0
 
LVL 9

Expert Comment

by:zemond
ID: 21758234
No problems, good luck with the project
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now