JQuery Scroller - Post ID 204329

User 2924428 Photo


Registered User
1,718 posts

Hey guy's, check out this code, I think I might be getting the two mixed up with other img codes..

<!DOCTYPE html>
<html>
<head>
<style>
/*This is for the font of the website */
<style type="text/css">
<!--
@font-face {
font-family: Damn Noisy Kids;
src: url('Damn Noisy Kids.ttf');}
.customfont {
font-family: Damn Noisy Kids; /* no .ttf */
font-size: 40px;
color: white;
}
/*End of Font Code*/
/*Backround Image Code*/
body
{
background:url(backround.png);
background-size:80px 60px;
-moz-background-size:80px 60px; /* Old Firefox */
background-repeat:repeat;
padding-top:20px;
}
/*End backround image code*/
/*This is Shadow Text Code*/
h1
{
text-shadow: 2px 2px 2px #FF0000;
}
/*End of Shadow Text*/
/*This code is for word wrap*/
p {word-wrap:break-word;}
/*End Word Wrap*/

#youtube
{
position:relative;
left:0px;
top:25px;
height:315px;
width:575px;
padding:10px;
border:5px solid gray;
margin:0px;
}
/*Beginning of box thread*/
#box1
{
position:relative;
left:-300px;
top:25px;
height:250px;
width:250px;
padding:10px;
border:5px solid gray;
margin:0px;
}

#box2
{
position:relative;
left:0px;
top:-275px;
height:250px;
width:250px;
padding:10px;
border:5px solid gray;
margin:0px;
}
#box3
{
position:relative;
left:300px;
top:-575px;
height:250px;
width:250px;
padding:10px;
border:5px solid gray;
margin:0px;
}
/*End of Box Thread*/
/*Social Bar For FB Twit YouT*/
#leftcontainerBox {
float: left;
z-index: 1000;
}

#leftcontainerBox .buttons {
clear: both;
float: left;
height: 75px;
margin: 4px;
padding-bottom: 2px;
padding-left: 3px;
width: 85px;
}
/*End Social Bar Code*/
/*Right Side Menu Bar*/
/*Menu Code for the Right Side*/
#menu
{
display: block;
width: 150px;
height: 45px;
}
/*End Menu Code*/
/*Button Hover Code*/
img
{
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
img:hover
{
opacity:1.0;
filter:alpha(opacity=100); /* For IE8 and earlier */
}
/*End Button Hover Code*/
/*Jquery Scroller Code*/
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.js"></script>
<style type="text/css">
.pics { height: 382px; width: 557px; padding:0; margin:0; overflow: hidden }
.pics img { height: 350px; width: 525px; padding: 15px; border: 1px solid #ccc; background-color: #eee; top:0; left:0 }
.pics img {
-moz-border-radius: 10px; -webkit-border-radius: 10px;
</style>
/*End JQuery Scroller Code*/
<style>
/*Javascript for Youtube Scroller*/
<script type="text/javascript">
$('#slideshow').cycle({
fx: 'fade',
timeout: 2000,
speed: 2000,
autostop: 1,

});
</script>
</style>
/*End Javascript for Youtube Scroller*/


</head>
<body>
<br>
<center><img src="logo.png" width="303" height="286" alt="" border="0"></center>
<br>
<div id="slideshow" class="pics">
<a href="http://www.youtube.com/watch?v=e5b6fyFsW0M"><img src="js/jqueryslideshow/sc1.PNG" width="641" height="390" alt="" border="0"></a>
<a href="http://www.youtube.com/watch?v=cx4FptzIhDI"><img src="js/jqueryslideshow/sc2.PNG" width="641" height="391" alt="" border="0"></a>
<a href="http://www.youtube.com/watch?v=pQuHs9rEqvo"><img src="js/jqueryslideshow/sc3.PNG" width="640" height="391" alt="" border="0"></a>
</div>
<br>
<div id="box1"><font color="#FF8000"><b><img src="images/eng_01.jpg" width="199" height="186" alt="" border="0"></b></font></div>
<br>
<div id="box2"><font color="#808080"><b><img src="images/outl_01.jpg" width="200" height="190" alt="" border="0"></b></font></div>
<br>
<div id="box3"><font color="#C0C0C0"><b><img src="images/embr_01.jpg" width="188" height="199" alt="" border="0"></b></font></div>
<br>
<br>
<div class="customfont">This is my font.</div>
<br>
<br>
<div style="border:1px solid #808080;position:fixed; top:40%; left:0px;" id="leftcontainerBox">

<div class="buttons">

<img src="social/faceb.png" width="80" height="80" alt="" border="0">

</div>
<div class="buttons">

<img src="social/twitter.png" width="80" height="80" alt="" border="0">

</div>
<div class="buttons">
<img src="social/yout.png" width="80" height="80" alt="" border="0">

</div>
<br>
<br>
<div style="border:1px solid #808080;position:fixed; top:40%; right:0px;" id="rightcontainerBox">
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_home.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_about.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_pic.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_cont.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_shop.png" width="150" height="40" alt="" border="0"></span></a>
</body>
</html>


* Please notice the jquery area where I use js/jscroller for my images, it's not working :(, I have the files installed on my PC for the jquery, but it's just showing three big boxes with images, and completely removes one of my #box divisions from the page. I don't know what's wrong.
User 2924428 Photo


Registered User
1,718 posts

While i'm at it can someone figure out how to get my <body> font up to where it should be in the HTML? It's showing in the footer section of the page and i've gone over my coding and can't find where it would be to change it around. Thanks guys! :D
User 2924428 Photo


Registered User
1,718 posts

Awe man guys, I just completely lost my 3 boxes under the youtube video trying to make the scroller.. heres the code.
<!DOCTYPE html>
<html>
<head>
<style>
/*This is for the font of the website */
<style type="text/css">
<!--
@font-face {
font-family: Damn Noisy Kids;
src: url('Damn Noisy Kids.ttf');}
.customfont {
font-family: Damn Noisy Kids; /* no .ttf */
font-size: 40px;
color: white;
}
/*End of Font Code*/
/*Backround Image Code*/
body
{
background:url(backround.png);
background-size:80px 60px;
-moz-background-size:80px 60px; /* Old Firefox */
background-repeat:repeat;
padding-top:20px;
}
/*End backround image code*/
/*This is Shadow Text Code*/
h1
{
text-shadow: 2px 2px 2px #FF0000;
}
/*End of Shadow Text*/
/*This code is for word wrap*/
/*End Word Wrap*/

#youtube
{
position:relative;
left:0px;
top:25px;
height:315px;
width:575px;
padding:10px;
border:5px solid gray;
margin:0px;
}
/*Beginning of box thread*/
#box1
{
position:relative;
left:-300px;
top:25px;
height:200px;
width:200px;
padding:10px;
border:5px solid gray;
margin:0px;
}

#box2
{
position:relative;
left:0px;
top:-275px;
height:200px;
width:200px;
padding:10px;
border:5px solid gray;
margin:0px;
}
#box3
{
position:relative;
left:300px;
top:-575px;
height:200px;
width:200px;
padding:10px;
border:5px solid gray;
margin:0px;
}
/*End of Box Thread*/
/*Social Bar For FB Twit YouT*/
#leftcontainerBox {
float: left;
z-index: 1000;
}

#leftcontainerBox .buttons {
clear: both;
float: left;
height: 75px;
margin: 4px;
padding-bottom: 2px;
padding-left: 3px;
width: 85px;
}
/*End Social Bar Code*/
/*Right Side Menu Bar*/
/*Menu Code for the Right Side*/
#menu
{
display: block;
width: 150px;
height: 45px;
}
/*End Menu Code*/
<style
img
{
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
img:hover
{
opacity:1.0;
filter:alpha(opacity=100); /* For IE8 and earlier */
}
</style>
</head>
<body>
<br>
<center><img src="logo.png" width="303" height="286" alt="" border="0"></center>
<br>
<br>
<div id="box1"><font color="#FF8000"><b><img src="images/eng_01.jpg" width="199" height="186" alt="" border="0"></b></font></div>
<br>
<div id="box2"><font color="#808080"><b><img src="images/outl_01.jpg" width="200" height="190" alt="" border="0"></b></font></div>
<br>
<div id="box3"><font color="#C0C0C0"><b><img src="images/embr_01.jpg" width="188" height="199" alt="" border="0"></b></font></div>
<br>
<br>
<div class="customfont">This is my font.</div>
<br>
<br>
<div style="border:1px solid #808080;position:fixed; top:40%; left:0px;" id="leftcontainerBox">

<div class="buttons">

<img src="social/faceb.png" width="80" height="80" alt="" border="0">

</div>
<div class="buttons">

<img src="social/twitter.png" width="80" height="80" alt="" border="0">

</div>
<div class="buttons">
<img src="social/yout.png" width="80" height="80" alt="" border="0">

</div>
<br>
<br>
<div style="border:1px solid #808080;position:fixed; top:40%; right:0px;" id="rightcontainerBox">
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_home.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_about.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_pic.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_cont.png" width="150" height="40" alt="" border="0"></span></a>
<a id="menu" href="http://www.kingfizz.com" title="menu"><span><img src="buttons/button_reg_shop.png" width="150" height="40" alt="" border="0"></span></a>
</body>
</html>
User 122279 Photo


Senior Advisor
14,624 posts

I'll have a look at your code if you stop changing your forum name daily ;) :P

It's so confusing! :o
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,624 posts

BTW, it is very hard to help solving problems when you just have the code, no contents. If you uploaded this to a temporary folder on your server, including the images, the custom font, and fill in some text (lorem ipsum or whatever.) as it is now, I can't see any font used anywhere, neither in the body nor in the footer.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,624 posts

To your 2nd post in this thread: You haven't declared any font-face for the body.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2924428 Photo


Registered User
1,718 posts

Hello Inger, thank you for looking at my code!! For some reason I deleted everything that I didn't want, and my boxes got all mixed up. I'm actually trying to code, 3 small boxes, 1 large box, text in the body, and in the large box a youtube scroller video using jsquery but I can't figure out the coding, my site got all mixed up, that last post was what's saved on my computer.. please look :)
User 2924428 Photo


Registered User
1,718 posts

BTW Changing my name back to original UnclePlusMax don't know what posessed me to change it in the first place.
User 122279 Photo


Senior Advisor
14,624 posts

Well, where do I start...

Have a look at http://www.eikweb.no/test-for-matt/matt2.html

I guessed that the site you were working on was that one. Grab the code from the test site, and download the zipped folder 'webfontkit'. Let me know when you have got everything, so that I can delete it from my site.

The web font:
Not all browsers understand .ttf yet, and besides, the font name was wrong. Unzip the webfontkit.zip and place the folder where you have your other folders and files. Then upload it to your site.That div with 'Some text' etc can of course be deleted.

The slideshow:
Once I had plucked the bits and bobs of it out from in between the css tags, it started working. You should never place any js inside the <style></style> tags, nor the otherway around, styles inside js script tags. Note also that I removed the relative positioning, both to make the slide show work and to line up the three images below as I guess you intended.

The missing image:
The first image was not removed by the box(es) of the slide show, but by your styling left: -300px; It was thus pushed 300px off the screen to the left.

Validation:
One thing you should do very often, is to have your code, both html and css validated. I would say after each item you add, then you know where to look when an error occurs and you won't have to search around the whole file to find it. There were a lot of errors in your code, and as I corrected them, things started working.

Html and css:
You should not mix them so that old, obsolete tags for colours, fonts, borders etc are given as html instead of css. I have removed all the border="0" I could find, but you are still left with some colours that you ought to remove from the html and put into the css.

Other:
I assume that you have the intention of working a bit on the design. As it is now, when watched on my 22' screen, the contents are squashed to the left and right sides with nothing in the middle. Also, it doesn't look very good to have the 'anti-social' bar on top of the images. But apart from that, I guess the site may appeal to youngsters (personally I'm not too fond of very dark background colours, but I'm not a gamer either, so I'll probably not visit your site very often anyway) ;)

Good luck!

Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2924428 Photo


Registered User
1,718 posts

Thanks Inger!! I read everything and got my website back on track, however I can't seem to get the backround image code to start working anymore. For future I will not use JQuery coding inside the <style> code ever again, thank you!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.