can I change this?

liunx

Guest
Check This (<!-- m --><a class="postlink" href="http://www.geocities.com/youlilsheshe/idk.html">http://www.geocities.com/youlilsheshe/idk.html</a><!-- m -->) Out. can I make it to where it takes up the whole page and to where the tabs are: smaller and on the sides?:confused:<!--content-->This is the HTML:<br />
<br />
<br />
<br />
<HTML><br />
<HEAD><br />
<TITLE>Document Title</TITLE><br />
<STYLE><br />
.conts{visibility:hidden}<br />
.tab{border-top:solid thin #E0E0E0;<br />
border-right:solid thin gray;<br />
border-left:solid thin #E0E0E0;<br />
font-family:Verdana;<br />
font-size:10pt;<br />
text-align:center;<br />
font-weight:normal}<br />
<br />
.selTab{border-left:solid thin white;<br />
border-top:solid thin white;<br />
border-right:solid thin black;<br />
font-weight:bold;<br />
text-align:center}<br />
<br />
</STYLE><br />
<SCRIPT LANGUAGE=JavaScript><br />
<br />
//a public function that the container uses to pass in values for the labels<br />
function public_Labels(label1, label2, label3, label4, label5, label6, label7){<br />
<br />
t1.innerText = label1;<br />
t2.innerText = label2;<br />
t3.innerText = label3;<br />
t4.innerText = label4;<br />
t5.innerText = label5;<br />
t6.innerText = label6;<br />
t7.innerText = label7;<br />
}<br />
<br />
//a public function that the container uses to pass in values for the card containers<br />
function public_Contents(contents1, contents2, contents3, contents4, contents5, contents6, contents7){<br />
<br />
t1Contents.innerHTML = contents1;<br />
t2Contents.innerHTML = contents2;<br />
t3Contents.innerHTML = contents3;<br />
t4Contents.innerHTML = contents4;<br />
t5Contents.innerHTML = contents5;<br />
t6Contents.innerHTML = contents6;<br />
t7Contents.innerHTML = contents7;<br />
<br />
init();<br />
}<br />
<br />
//sets the default display to tab 1<br />
function init(){<br />
tabContents.innerHTML = t1Contents.innerHTML;<br />
}<br />
<br />
//this is the tab switching function<br />
var currentTab;<br />
var tabBase;<br />
var firstFlag = true;<br />
<br />
<br />
function changeTabs(){<br />
<br />
if(firstFlag == true){<br />
currentTab = t1;<br />
tabBase = t1base;<br />
firstFlag = false;<br />
}<br />
<br />
if(window.event.srcElement.className == "tab"){<br />
<br />
currentTab.className = "tab";<br />
<br />
tabBase.style.backgroundColor = "white";<br />
<br />
currentTab = window.event.srcElement;<br />
<br />
tabBaseID = currentTab.id + "base";<br />
<br />
tabContentID = currentTab.id + "Contents";<br />
<br />
tabBase = document.all(tabBaseID);<br />
<br />
tabContent = document.all(tabContentID);<br />
<br />
currentTab.className = "selTab";<br />
<br />
tabBase.style.backgroundColor = "";<br />
<br />
tabContents.innerHTML = tabContent.innerHTML;<br />
<br />
}<br />
}<br />
<br />
</SCRIPT><br />
</HEAD><br />
<BODY BGCOLOR=#C0C0C0 onclick="changeTabs()" onload="init()"><br />
<br />
<br />
<DIV STYLE="position:absolute; top:40; height:350; width:500; left:25; border:none thin gray"><br />
<br />
<br />
<TABLE STYLE="width:100%; height:250" CELLPADDING=0 CELLSPACING=0><br />
<TR><br />
<TD ID=t1 CLASS=selTab HEIGHT=25>tab 1</TD><br />
<TD ID=t2 CLASS=tab>tab 2</TD><br />
<TD ID=t3 CLASS=tab>tab 3</TD><br />
<TD ID=t4 CLASS=tab>tab 4</TD><br />
<TD ID=t5 CLASS=tab>tab 5</TD><br />
<TD ID=t6 CLASS=tab>tab 6</TD><br />
<TD ID=t7 CLASS=tab>tab 7</TD><br />
</TR><br />
<TR><br />
<TD ID=t1base STYLE="height:2; border-left:solid thin white"></TD><br />
<TD ID=t2base STYLE="height:2; background-color:white"></TD><br />
<TD ID=t3base STYLE="height:2; background-color:white"></TD><br />
<TD ID=t4base STYLE="height:2; background-color:white"></TD><br />
<TD ID=t5base STYLE="height:2; background-color:white"></TD><br />
<TD ID=t6base STYLE="height:2; background-color:white"></TD><br />
<TD ID=t7base STYLE="height:2; background-color:white; border-right:solid thin white"></TD><br />
</TR><br />
<br />
<br />
<TR><br />
<TD HEIGHT="*" COLSPAN=7 ID=tabContents<br />
STYLE="border-left:solid thin white;<br />
border-bottom:solid thin white;<br />
border-right:solid thin white">sample contents</TD><br />
<br />
</TR><br />
</TABLE><br />
</DIV><br />
<br />
<br />
<DIV CLASS=conts ID=t1Contents>This text is on tab one</DIV><br />
<DIV CLASS=conts ID=t2Contents>This text is on tab two</DIV><br />
<DIV CLASS=conts ID=t3Contents>This text is on tab three</DIV><br />
<DIV CLASS=conts ID=t4Contents>This text is on tab four</DIV><br />
<DIV CLASS=conts ID=t5Contents>This text is on tab five</DIV><br />
<DIV CLASS=conts ID=t6Contents>This text is on tab six</DIV><br />
<DIV CLASS=conts ID=t7Contents>This text is on tab seven</DIV><br />
</BODY><br />
</HTML><!--content-->ugh, that whole layout will need to be gutted. The working code can stay though. But I actually suggest dropping it all together because it is done client side. If you used server side scripting you could make the stuff the client browser sees more simplistic and it would be better supported. You could also do this with a few html pages too and just haveing different images on each one too.<!--content-->What!!!!!! I work with Html so can someone give me a script with what i asked? Does one exist? Or doesn't it? im not yelling im just askin<!--content-->You can modify that but keep in mind it is not going to work on anything but ie. It does not work with mozilla which means it will not work with ns either. I did not test it in opera but the chances are it will not work in that either. Thats why I say ditch it. There is also and additional 13% of the internet population it will not work for that keep their java script off or can't read it. You are probably making your page content that is on the other tabs inaccessable to as high as 30% of the users on the internet since you are excluding ns based browsers and older version of ie and opera.<!--content-->is there something else that i can use that is sort of like that, that works for everyone? I need to make some kind of online newspaper and I thought that this would be good cause it hase tabs that i could put on the side so that people could get to different parts of the paper without having to load a new page everytime. So do you have anything else?:confused:<!--content-->I changed the size of the table to 100% in your code at this point.<br />
<br />
<DIV STYLE="position:absolute; top:40; height:350; width:100%; left:5; border:none thin gray"><br />
<br />
It worked in NS 7 for me<!--content-->Hi!<br />
<br />
If you insist in handling things at least similar to what you have now, I only see one way:<br />
<br />
The changetab has to be an onclick event on each tab - toggling visibility (note that the function for that has to be browser specific). The content for the tab which is clicked has to be set to visible all others to hidden.<br />
<br />
One word about Opera: afaik, Opera cannot handle changing the contents of a div or something. The contents of each container has to be already predefined - the rest is dealing with the visibility of the container...<br />
<br />
This innerText and innerHTML stuff will keep off your contents from non-IE users (just what PeOfEo said!)<br />
<br />
Cheers - Pit<!--content-->You might swap out the visibility your divs using this java script<br />
<br />
function showmenu(elmnt)<br />
{<br />
document.getElementById(elmnt).style.visibility = "visible";<br />
}<br />
function hidemenu(elmnt)<br />
{<br />
document.getElementById(elmnt).style.visibility = "hidden";<br />
}<br />
<br />
and calling those on mouseclick of tab. It would mean putting the code to make all of the others invisible on each tab though. The problem is your code now is ie specific. But this code here, something that pyro and toicontein (I probably spelled that wrong) showed me. It is not ie specific and I used it for the drop downs on the new site I am making, <!-- w --><a class="postlink" href="http://www.paxonradio.vze.com">www.paxonradio.vze.com</a><!-- w --><!--content-->i dont understand!!!!!!<!--content-->This is your page on mozilla btw, those tabs do nothing on mouse click, its as if I were clicking plain text.<!--content-->
 
Back
Top