Jump to content

Search the Community

Showing results for tags 'to div'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. I'm trying to create a section on a page where it displays a random image from a given folder on page load. I also want this image section to be somewhat transparent, so that the text in front of it is readable. Very sorry if I bungle the terminology, I'm relatively new at this: 1. What code should I use, or how do I write the code, to automatically load a random image from a folder as a <div> section "background-image" on page load? I know how to do this for one specific image, but I don't know how to point to folder full of images and then have it select one at random each time the page loads. 2. How do I make it so that the text on the page is centered within the boundaries of the image, and the image is somewhat transparent so that the dark grey background of the page causes the image to appear darker, in turn making the lighter text in front readable? Can all this be done using embedded CSS or will I need to learn some basic Javascript (at least for #1)? My website is set up so that the index.html page is in the root folder, and the images I want to randomly load are in a folder within that one called "img/". If you post any examples, I'd really appreciate it if they are either annotated so that an idiot like me could figure out how to apply them, or already formatted to suit my folder structure. Please be aware that it's also already running Bootstrap and Swipebox externally, so I'm trying to be mindful of overlapping labels that might cause this whole thing not to work. Thanks for reading!
×
×
  • Create New...