Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Need help...

  1. #1
    Join Date
    May 2012
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Need help...

    Hi. I have a project that I am working on and do not know how to go about doing it. I am hoping someone here can help. This may sound simple to some but this is WAY over my head. If anyone would be willing to help me I would be greatly appreciative.
    :
    What I am trying to do: they say a pic is worth a thousand words so here is a png of what I want my finished item to look like.... https://picasaweb.google.com/lh/phot...eat=directlink (I have also included a couple of pics on this post showing the background change.) This is not a full page item. It will take about the same size as the picture. There are three key items in the project. Background (cycling), Weather, and a random did you know? Let me describe what I want each to do…

    1. The background: every time the page is refreshed the image will be a different scene.
    2. Weather: I have a script which will already make this happened. However I want it placed and formatted as in my picture.
    3. Did you know? This is another (div?) with a border around it like the weather block. Every time the page is refreshed a new text will cycle through.

    I want to do this in HTML5 and CSS3. I hope I am describing clear enough of what I am trying to do. If you have any questions please ask! If anyone would be willing to help me I would be greatly appreciative. Thank you!!
    Last edited by shsunnyday; 06-22-2012 at 01:30 AM.

  2. #2
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by shsunnyday View Post
    Hi. I have a project that I am working on and do not know how to go about doing it. I am hoping someone here can help. This may sound simple to some but this is WAY over my head. If anyone would be willing to help me I would be greatly appreciative.
    :*
    What I am trying to do: they say *a pic is worth a thousand words so here is a png of what I want my finished item to look like.... https://picasaweb.google.com/lh/phot...eat=directlink (I have also included a couple of pics on this post showing the background change.) *This is not a full page item. It will take about the same size as the picture. There are three key items in the project. Background (cycling), Weather, and a random did you know? Let me describe what I want each to do…

    1. The background: every time the page is refreshed the image will be a different scene.
    2. Weather: I have a script which will already make this happened. However I want it placed and formatted as in my picture.
    3. Did you know? This is another (div?) with a border around it like the weather block. Every time the page is refreshed a new text will cycle through.

    I want to do this in HTML5 and CSS3. I hope I am describing clear enough of what I am trying to do. If you have any questions please ask! *If anyone would be willing to help me I would be greatly appreciative. Thank you!!

    Ok, so this is basically fairly simple stuff.

    1. If you want this done the simplest way possible, you'll want to use JavaScript. *
    Here's some example code for it.
    Code:
    <html>
    <head>
    
    <style>
    body
    {
    /*Remove below line to make bgimage NOT fixed*/
    background-attachment:fixed;
    background-repeat: no-repeat;
    /*Use center center in place of 300 200 to center bg image*/
    background-position: 300 200;
    }
    </style>
    
    <script language="JavaScript1.2">
    /* you must supply your own images */
    var bgimages=new Array()
    bgimages[0]="http://js-examples.com/images/blue_ball0.gif"
    bgimages[1]="http://js-examples.com/images/red_ball0.gif"
    bgimages[2]="http://js-examples.com/images/green_ball0.gif"
    
    //preload images
    var pathToImg=new Array()
    for (i=0;i<bgimages.length;i++)
    {
    * pathToImg[i]=new Image()
    * pathToImg[i].src=bgimages[i]
    }
    
    var inc=-1
    
    function bgSlide()
    {
    * if (inc<bgimages.length-1)
    * * inc++
    * else
    * * inc=0
    * document.body.background=pathToImg[inc].src
    }
    
    if (document.all||document.getElementById)
    * window.onload=new Function('setInterval("bgSlide()",3000)')
    </script>
    
    </head>
    <body>
    <BR><center><a href='http://www.js-examples.com'>JS-Examples.com</a></center>*
    </body>
    </html>
    2. * Fairly simple, itd end up with the same kind of styling as number 3, so a background color as gray, then you have the image, with a padding-left of roughly * 20px, and then have a button with a background color of white and text color black and this should all have the appropriate heights and widths that you want. and then just put your code for getting the weather next to it.


    3. Depending on whether you only to scroll once when you open the page or continuously, the code would be something along the lines of:

    Only when the page refreshes:

    Code:
    <div id="container">
    <h1 style="color: black;">Did you know?</h1>
    <div id="SlidingText">
    <marquee behavior="slide" direction="left">Your slide-in text goes here</marquee>
    </div>
    <button style="background-color: blue; color: white;" id="findout">Learn About Lincoln</button>
    </div>
    CSS:
    Code:
    #SlidingText {
    background-color: white;
    height: 100px;
    width: 200px;
    margin: 100px;
    }
    
    #container {
    background-color: gray;
    height: 200px;
    length: 300px;
    }
    and then you basically do excactly the same thing for continuously scrolling except change:*
    Code:
    <marquee behavior="slide" direction="left">Your slide-</marquee>
    to:
    Code:
    <marquee behavior="scroll" direction="left">Your slide-
    </marquee>

  3. The Following User Says Thank You to bernie1227 For This Useful Post:

    shsunnyday (06-15-2012)

  4. #3
    Join Date
    May 2012
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by orobertl View Post
    whs



    The pics are not showing up..

  5. #4
    Join Date
    Mar 2011
    Posts
    2,144
    Thanks
    59
    Thanked 116 Times in 113 Posts
    Blog Entries
    4

    Default

    @shsunnyday

    They're not meant to. It's a spam bot that's spamming the forum. (The images link back to the spamists site {or at least probably do})

    When one of the mods is next on, they'll remove all their posts and ban them from the forum.

  6. #5
    Join Date
    May 2012
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    @bernie1227 Thank you for your in-depth help! I am working on it and will let you know how I come. Still need to put the weather script in as well as the randomize part... Still not done yet, but have got the layout all made. It is looking nice.

  7. #6
    Join Date
    May 2012
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    ok. to bad people try to do such things as clutter up useful websites.

  8. #7
    Join Date
    Mar 2011
    Posts
    2,144
    Thanks
    59
    Thanked 116 Times in 113 Posts
    Blog Entries
    4

    Default

    Yes, it's mainly because when there is a link to a site (what they posted) google (and other SEs) ranks the linked website higher. This is called an SEO boost (at least that's what I call it )

  9. #8
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Back on topic, if you need any more help, ask me

  10. #9
    Join Date
    May 2012
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bernie1227 View Post
    Back on topic, if you need any more help, ask me
    I got it completely built and put in the random background, text and weather, all that works well. However... when I try putting it into my page the entire think is messed up.

    1. Directly put code into page: the gray area around the weather and do you know do not show up! (see pic: https://picasaweb.google.com/lh/phot...eat=directlink)

    2. iframe: from this picture (https://picasaweb.google.com/lh/phot...eat=directlink) you can see that the gray shows up but the entire thing does not completely show.

    3. php include: (https://picasaweb.google.com/lh/phot...eat=directlink) Also problems. The gray does not show and the entire thing is covering content which should be below it. not underneath.

    what is the best thing to do?
    Thanks!

  11. #10
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by shsunnyday View Post
    I got it completely built and put in the random background, text and weather, all that works well. However... when I try putting it into my page the entire think is messed up.

    1. Directly put code into page: the gray area around the weather and do you know do not show up! (see pic: https://picasaweb.google.com/lh/phot...eat=directlink)

    2. iframe: from this picture (https://picasaweb.google.com/lh/phot...eat=directlink) you can see that the gray shows up but the entire thing does not completely show.

    3. php include: (https://picasaweb.google.com/lh/phot...eat=directlink) Also problems. The gray does not show and the entire thing is covering content which should be below it. not underneath.

    what is the best thing to do?
    Thanks!
    Ok, shsunnyday, I think I can see most of your problems.

    1. Find the divs surrounding the two parts, and set the background color on them to gray. (please post the code so I can check this)

    2. I'll need you to post the code for the Iframe please

    3. Sorry abou that, I think that may have been my fault, the problem is that the text is to big for the button. I suggest you make the height of the button bigger.

    Please post the code for the iframe and the first question!
    Thanks
    Bernie

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •