PDA

View Full Version : Music BAR HELP!


avlavigne2
02-26-2005, 01:11 PM
I know how to put music on my site but every time I click a new page it starts over and it gets really annoying. This site right here (http://www.avrillavigne.com) has like a bar thing at the top that keeps playing throught out pages and that would be find too. I would like to have the code for the first one but either would be ok I guess. Thanks!

Hunter.

Daf
02-26-2005, 02:39 PM
Hi,

The site you refer to is using frames. The top frame (http://www.avrillavigne.com/top.html) is constant and is playing the music through a Flash movie. The bottom frame contains the actual content - this content changes per page but the top frame remains in place.

To replicate this you would need to set up a similar scenario with a top (containing the Flash/music) and bottom frame. :)

Daf

avlavigne2
02-26-2005, 04:38 PM
that would be great but i have no clue how to do that... lol elaborate please lol

_Aerospace_Eng_
02-26-2005, 10:30 PM
okay here are two ways of doing this, one way would be to have a top div and a bottom iframe all in one div container
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Top Div and Iframe</title>
<style type="text/css">
html,body {
margin:0px;
padding:0px;
height:100%;
overflow:hidden;
}
#container {
height:100%;
}
#top {
width:100%;
height:7%;
text-align:center;
}
#bottom {
width:100%;
height:93%;
}
</style>
</head>

<body>
<div id="container">
<div id="top">Your music player here</div>
<iframe id="bottom" name="bottom" src="yourmainpagehere.html" frameborder="0" scrolling="auto">
Your browser does not support frames
</iframe>
</div>
</body>
</html>
and another way would be to just use a frameset which would require one extra page, which would have a fixed top frame and a bottom frame
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<frameset rows="80,*" frameborder="NO" border="0" framespacing="0">
<frame src="top.html" name="top" scrolling="NO" noresize >
<frame src="yourmainpagehere.html" name="main">
</frameset>
<noframes><body>
</body></noframes>
</html>