Jump to content

a couple little things


thescientist

Recommended Posts

Probably nothing big for you pros, but I have a couple of quick questions.www.analogstudios.net/music.html1) In IE7, the headers "October Events" and "Analog Music" are both the same distance from the nav bar at the top. However, in FF3, the "Analog Music" header is slightly higher. Any ideas?CSS (hopefully not too badly organized):

/* CSS Document *//* Formatting */body{	background-color: #000000;}p{	font-family: Georgia, Arial, Helvetica, sans-serif;	color: #FFFFFF;}h3{	font-family: "Garamond";	color: #FFFFFF;	background: url(images/curve_top.png) no-repeat;}ul{	margin: 0;	padding: 0;	list-style: none;	width: 800px;	float: left;	background: #FAA819 url(images/button.gif) repeat-x;}ul a{	display: block;	float: left;	padding: 0 2em;	line-height: 2.1em;	background: url(images/divider.gif) repeat-y left top;	text-decoration: none;	color:#000000;}ul .first a{	background: none;}ul a:hover{	color: #669999;	/*background: #FAA819 url(images/button2.gif) repeat-x;*/}ul li{	float: left;}a.tooltip{	position: relative;}a.tooltip span{	display: none;}a.tooltip:hover span{	display: block;	position: absolute;	top: 1em;	left: 2em;	padding: 0.2em 0.6em;	border: 1px solid #996633;	background-color: #FFFF66;	color: #000000;}/* Boxes */#container{	width: 800px;	margin: auto;	border-style: none;	border-color: #FFFFFF;	background-color: #000000;}#header_container{	width: 800px;	margin: auto;	border-style: none;	background-color: #000000;	margin-bottom: 25px;}#banner{	width: 800px;	margin: 0;	padding-bottom: 24px;}#link_container{	width: 800px;	margin: auto;	border-style: none;}#body_container{	width: 800px;	margin: 0;	border-style: solid;	border-color: #FFFFFF;}#left_column{	position: relative;	left: 0;	width: 240px;	padding: 0px 0px 0px 0px;	border-style: none;	border-color: #FFFFFF;	float: left;	background-color: #000000;	font-family: "courier";	color: #000000;}	#content_column{	padding: 0px 0px 0px 10px;	margin-left: 250px;	border-style: none;	border-color: #FFFFFF;	background-color: #000000;	color: #FFFFFF;}#left_column h3{	font-family: "Times";	color: #FFFFFF;	background: url(images/curve_top.gif) no-repeat;}#content_column	h3{	font-family: "Garamond";	color: #FFFFFF;	background: url(images/curve_top2b.gif) no-repeat;}#content_column a:link{	color: #669999;}#content_column a:visited{	color: #FFFFFF;}#content_column a:hover{	color: #BAB4B4;}#footer{	clear: both;}#footer p{	font-family: "times";}/* Misc */.bio img{	float: left;}.bio p{	float: right;}

2) When someone clicks on one of the songs, how do I get it so it brings up the download dialog box as opposed to just having it open in the browser? For instance, FF3 and IE7 open it in-page with Quicktime on my computer. Do I have to add "right-click to download" in the text or is there a way to get a download type screen?Thanks for the help, hopefully they should just be quick fixes. I have a couple PHP things I'm going to add, but that's for a different forum. Any feedback on the sites design, layout, formatting would be appreciated. I know its a pretty straightforward approach, but it should get the job done for now. Thanks everyone!

Link to comment
Share on other sites

Guest FirefoxRocks

I'm not sure of the CSS issue as I do not have access to Internet Explorer right now (I don't feel like restarting into Windows) :)For me, the link opens the Download box in Konqueror and Firefox, however this is because I don't have Quicktime, RealPlayer or Windows Media Player on Linux here. To force a download box to appear no matter what, you do this:

<a href="http://www.analogstudios.net/music/losttime/04%20-%20Ping%20Pong%20Game.mp3" type="application/octet-stream">4) Ping Pong Game</a>

Link to comment
Share on other sites

I'm not sure of the CSS issue as I do not have access to Internet Explorer right now (I don't feel like restarting into Windows) :)For me, the link opens the Download box in Konqueror and Firefox, however this is because I don't have Quicktime, RealPlayer or Windows Media Player on Linux here. To force a download box to appear no matter what, you do this:
<a href="http://www.analogstudios.net/music/losttime/04%20-%20Ping%20Pong%20Game.mp3" type="application/octet-stream">4) Ping Pong Game</a>

hmm, type="application/octet-stream" didn't seem to work.....
Link to comment
Share on other sites

You could use PHP to attach the file and force the content-type.
ok, i'll google around and see what i can find. found something about using htacess to force download, but I can't find that in my server directory. any opinions regarding that method?anyone have any ideas about the first problem, regarding the CSS?
Link to comment
Share on other sites

About the October Events problem, your <h3> element has margins. Add this to your CSS:

h3 { margin: 0 }

If you want to only apply it to that <h3> element then give it a class name.

Link to comment
Share on other sites

About the October Events problem, your <h3> element has margins. Add this to your CSS:
h3 { margin: 0 }

If you want to only apply it to that <h3> element then give it a class name.

sweet, that worked! thanks.any ideas about forcing a download? Someone suggested PHP, but a google search returned a suggestion about using htaccess. Thoughts?
Link to comment
Share on other sites

I suppose .htaccess could force the file type in a folder to be application/octet-stream.Something like this:

AddType application/octet-stream .mp3

And you only put the .htaccess file in the folder where the downloadable music is.I haven't tested it, I'm just assuming this by logic (I used a .htaccess file to interpret .rss files with the application/rss+xml type with the same code).

Link to comment
Share on other sites

I suppose .htaccess could force the file type in a folder to be application/octet-stream.Something like this:
AddType application/octet-stream .mp3

And you only put the .htaccess file in the folder where the downloadable music is.I haven't tested it, I'm just assuming this by logic (I used a .htaccess file to interpret .rss files with the application/rss+xml type with the same code).

so is what you wrote in the <
Link to comment
Share on other sites

Just put the code I gave into a file named .htaccess.It possibly could be done with PHP, but I would have to test it to be sure. Here's how PHP might be able to do it:

<?php$file = file_get_contents($_GET['filename']);// We get the file name from the query string so that this file can be used for any other file.header("Content-type: application/octet-stream");echo $file; //Output the contents of the sound file?>

You would have to link to the PHP file like this:

<a href="music.php?filename=song1.mp3">Song 1</a>

Where you would change song1.mp3 for the location of the sound file relative to the music.php fileAt the moment, I have more trust in a .htaccess file.

Link to comment
Share on other sites

Just put the code I gave into a file named .htaccess.It possibly could be done with PHP, but I would have to test it to be sure. Here's how PHP might be able to do it:
<?php$file = file_get_contents($_GET['filename']);// We get the file name from the query string so that this file can be used for any other file.header("Content-type: application/octet-stream");echo $file; //Output the contents of the sound file?>

You would have to link to the PHP file like this:

<a href="music.php?filename=song1.mp3">Song 1</a>

Where you would change song1.mp3 for the location of the sound file relative to the music.php fileAt the moment, I have more trust in a .htaccess file.

do i need any doctype or anything like that?
Link to comment
Share on other sites

Not for the PHP code, just put it right into the document as it is and save it as music.php. We're not dealing with HTML here, we're dealing with raw PHP.
sorry, I was referring to the .htaccess for doctype because it wasn't working, so i thought it needed something else. Anyway, I was planning on making all my pages .php anyway for email forms and whatnot, so I will probably just follow your php example for forcing the download.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...