PDA

View Full Version : browser tabs problem


songboy
04-22-2011, 03:14 PM
I'm going through the final trials of my website. When I preview a page in any of the main browsers I'm noticing that at the top of the screen, next to the browser name are the words 'bottom banner'. In the tabs section (lower down) the phrase appears two or three times also (all browsers).
What I think it is picking up is the name of the html include which is in the page code - it's.... include("bottombanners.html"). Now, in case you are wondering (!) this refers to the banner advert divs that appear at the bottom of most of the different pages. Not only does one instance of this look slightly bizaar (to say the least), as you trawl through the pages the tab instances of the phrase increase until they are right across the screen !! I guess that's because the include is mentioned at the top of nearly all the viewed pages.
I've just tried to comment out the include. The divs are gone but 'bottom banners' is still there in the tabs section and at the top in the blue section (Firefox).
I'm not sure why this is happening - I'm afraid it shows that I haven't really got a strong knowledge of the intricacies of browser pages.
Could someone tell me how to deal with this ?
Of all phrases, 'bottom banners' is not one that you'd want to have right across the top of your index page.
Thanks -
Songboy

Corrosive
04-22-2011, 03:19 PM
Of all phrases, 'bottom banners' is not one that you'd want to have right across the top of your index page.


Lol. I could think of worse but not much :wink: Link please!

songboy
04-23-2011, 08:53 PM
I looked at the source code (eventually) and noticed that my include (which I titled 'bottom banners') shows up at the beginning of the code. Further down is another head section (part of the page which receives the include) where the page is titled 'song choice page'. I now realise that the first head section is parsed before the other - hence the tab title showing 'bottom banners'. Of course, as this include appears on most pages, as you travel through the pages, the 'bottom banners' title spreads across the page.
The problem now is, is it possible to include the html code that represents the banner divs within the index page which is a php page, without using the head section ?
This is the include code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>untitled</title>
<link href="mystyles1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#Layerbottomadds {
position:absolute;
left:0px;
top:0px;
width:260px;
height:60px;
z-index:1;
}
#Layerbottadd1 {
position:absolute;
left:0px;
top:0px;
width:260px;
height:60px;
z-index:1;
}
#Layerbottadd2 {
position:absolute;
left:306px;
top:0px;
width:260px;
height:60px;
z-index:12;
}
#Layerbottadd3 {
position:absolute;
left:610px;
top:0px;
width:260px;
height:60px;
z-index:2;
}
-->
</style>
</head>
<body>
<div id="Layerbottomadds">
<div id="Layerbottadd1"><img src="images/musictechlogo.png"alt="magazine banner" width="260" height="50"/></div>
<div id="Layerbottadd2"><img src="images/compmusiclogo.jpg" alt="magazine banner" width="260" height="50" /></div>
<div id="Layerbottadd3"><img src="images/soslogo.png" alt="magazine banner" width="260" height="50" /></div>
</div>

</body>
</html>
If you can tell me how to include the above within a php page without involving the head section from the html include, I would be very grateful as I've searched around today and find myself thinking that it can't be done.
Hoping someone sees this !
Songboy

DWcourse
04-23-2011, 09:01 PM
An include file should not be a complete html page but should include only the code you want to insert in your document. So this is probably all you need in the include:

<div id="Layerbottomadds">
<div id="Layerbottadd1"><img src="images/musictechlogo.png"alt="magazine banner" width="260" height="50"/></div>
<div id="Layerbottadd2"><img src="images/compmusiclogo.jpg" alt="magazine banner" width="260" height="50" /></div>
<div id="Layerbottadd3"><img src="images/soslogo.png" alt="magazine banner" width="260" height="50" /></div>
</div>

songboy
04-24-2011, 12:42 AM
Thanks DW for your help - it worked.
All I had to do was move the styles to the correct folder and the whole thing rendered fine. I'm quite shocked because I thought it was going to lead to much re-coding.
Thanks again -
Songboy