View Full Version : Help with placing audio files in an HTML page

The Magus
18th January 2013, 12:53 PM
I'm working on a webpage for my CSCI 100 course at school, and I want to place some simple audio files in the pages. I've been searching google for help with the coding, but still can't seem to get it to work. I believe I am using HTML 4.01 (or at least I know I'm not using HTML 5, since the codes for that version don't seem to work).

Also, if anyone knows of a database or collection of audio files that could be used in HTML, I would be extremely grateful. I'm looking for halloween/evil or dark kinds of files (ie. evil laughs, creaking doors, footsteps, heartbeats, etc.)

All help would be appreciated! Thanks very much!

19th January 2013, 05:27 AM
If you put the correct HTML 5 doctype at the beginning of your page, provided your browser supports it (read chrome/firefox) you can use the html 5 media tags; they are by far the easiest way to play audio. For more cross browser support, you should look at a javascript solution such as http://www.jplayer.org/ jplayer.

The Magus
22nd January 2013, 05:39 PM
Thanks. On another note, however, I'm having trouble getting a CSS3 script to work. I'm trying to put a background up on a page, while keeping the background within the dimensions of my screen. Using the basic <body background> tag, I've been able to get the background to show up, but it's kind of cut off on one side of the screen.
That's the link to the background I'm trying to place. I want to put a DBZ Abridged video between the eyes, but everytime I offset the video, it pushes the entire page over, so you have to scroll to the right to center it all. I want to fix this, so that there is no need to scroll to the right.

I've been using the website quackit.com for help getting different codes to use, but it seems every time I use a CSS3 code, it doesn't seem to work. This is what I have plugged in so far:

<!doctype html>
<style type="text/css">
.background {
background-image: url("http://fc05.deviantart.net/fs42/f/2009/067/8/c/Popo_Wallpaper_by_Skandranon01.jpg");

-moz-background-size: 200px 50px;


It's essentially a copy of what I found on the website, with the url of the background image I want plugged into the coding. The problem is, every time I preview the page, it's just a white screen, even though when I use the preview function on quackit.com, it seems to work. I'm not sure what to do here.

EDIT: On a completely unrelated matter, who do I talk to about getting my username changed? It's been a long time since I made this one, and I'd like a new one.

23rd January 2013, 12:02 AM
Getting backgrounds to scale with the page is HARD. I spent much of a weekend doing it and its still not as I'd like. Take a look at www.imhotek.net (http://www.imhotek.net) feel free to borrow the css for positioning the background. The basic idea was to sit a fixed positioned div in the background and put an image inside that div positioned absolutly. This was to prevent the browser from stretching my image too much, it works well on normal monitors, widescreens get a white bar on either side; one day i'll get around to fixing that by feathering the image into a gradient which can repeat over as much width as required.

Edit: for a name change post in the admin assistance forum thingy.

The Magus
1st February 2013, 09:51 AM
Just a quick question regarding hosting my html site, currently it's only hosted on my school's network, and I'm having difficulty accessing it from a regular browser. I'd just like to know of some good sites that I could place my files on to host my website.

10th February 2013, 04:50 AM
For testing and developing locally, Xampp (http://www.apachefriends.org/en/xampp.html) is the best option. If you are looking to put it up somewhere for everyone to see, I can't really make any recomendations: I've never used shared hosting services, my stuff has always been far too big and has required dedicated servers. That said, if you can't find anything within your budget, I might be able to help you out with some hosting on one of my servers.