Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two CSS file links in one HTML page

Status
Not open for further replies.

TyzA

Programmer
Jan 7, 2002
86
BE
Hi,

I've created 2 CSS files (table3.css & table4.css) with both a different use of colors, etc.

I have an HTML document with some tables in (See the code below). I a column of this table there is an other HTML page. So it's HTML in HTML.
This works fine.

What I would like to do is, but I can't get it done, I want the main HTML page to use table4.css as style sheet and the inner HTML page table3.css.

What happens is that the entire page in my browser gets the style from table3.css, the style sheet for the inner HTML page, while everything that is not part of the inner HTML code should get the style of table4.css.

I've included the entire HTML code so you can have a look at it.

Hope you guys or girls can help me.

Thanks in advance.

Rgds,

Tijs


<HTML>
<HEAD>
<TITLE>Proximus Tariff Check-up Application - Menu</TITLE>
<link rel=&quot;stylesheet&quot; href=&quot;table4.css&quot;>
</HEAD>
<BODY>
<FORM name=&quot;frmEurekaMenu&quot; METHOD = &quot;post&quot;>
<INPUT type=hidden name=&quot;link_clicked&quot; >
<INPUT type=hidden name=&quot;ConfirmBulkTariffOK&quot; >
<INPUT type=hidden name=&quot;butOpen&quot; >
<TABLE cellSpacing=0 cellPadding=0 width=&quot;850&quot; border=0 style=&quot;HEIGHT: 480px; WIDTH: 850px&quot; align=left>
<TR>
<TD WIDTH=175>
<IMG alt=Tariff Check-up src=&quot;./SilverStream/Objectstore/Images/Logo.jpg&quot;>
</TD>
<TD>
<TABLE style=&quot;HEIGHT: 100px; WIDTH: 544px&quot; cellSpacing=0 cellPadding=0 width=544 border=0 ALIGN=center>
<TR>
<TD ALIGN=middle>
<STRONG><font color=&quot;#400080&quot; size=&quot;5&quot; face=&quot;Comic Sans MS&quot;>Proximus Tariff Check-up Application</font></STRONG>
&nbsp;
</TD>
</TR>
<TR>
<TD ALIGN=middle>
<STRONG><EM><font size=&quot;4&quot; face=&quot;Comic Sans MS&quot;>Tariff Check-up Menu</font></EM></STRONG>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD VALIGN=center>

<html>
<head>
<meta http-equiv=&quot;Content-Type&quot;content=&quot;text/html; charset=iso-8859-1&quot;><meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage Express 2.0&quot;>
<title></title>

<link rel=&quot;stylesheet&quot; href=&quot;table3.css&quot;>

</head>

<body bgcolor=&quot;#FFFFFF&quot;>
<table width=&quot;138&quot; border=&quot;0&quot; align=&quot;left&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td height=&quot;13&quot;>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;><a href=&quot;#&quot;>:: New Optimisation ::&nbsp; </a></div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Request History ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Bulk Tariff Sheet ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Online Swap ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;><a href=&quot;#&quot;>:: Temporary group ::&nbsp; </a></div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: User Profile ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Usage Summary ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;><a href=&quot;#&quot;>:: Finalise Request ::&nbsp;&nbsp;&nbsp; </a></div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>&nbsp;</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Save Request ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;></div>
</td>
</tr>
</table>
</body>
</html>

</TD>
<TD ALIGN=middle VALIGN=center>
<TABLE style=&quot;HEIGHT: 91px; WIDTH: 322px&quot; cellSpacing=0 cellPadding=0 width=322 border=0 align=center>
<TR>
<TD ALIGN=left>
<B><FONT FACE=&quot;Comic Sans MS&quot; SIZE=2 COLOR=#000000>Account Number</FONT></B>
</TD>
<TD ALIGN=middle WIDTH=10>
<B><FONT FACE=&quot;Arial&quot; SIZE=2 COLOR=#000000>:</FONT></B>
</TD>
<TD>
<INPUT name=&quot;fldAccountNumber&quot; onbeforepaste=&quot;restrict('AccountNumber');&quot; value=&quot;&quot; onkeypress=&quot;restrict('AccountNumber');&quot; ondblclick=&quot;restrict('AccountNumber');&quot; style=&quot;HEIGHT: 22px; WIDTH: 169px&quot; size=15 MAXLENGTH=8>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<BR>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<FONT FACE=&quot;Comic Sans MS&quot; SIZE=1 COLOR=#000000> OR </FONT>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<BR>
</TD>
</TR>
<TR>
<TD ALIGN=left>
<B><FONT FACE=&quot;Comic Sans MS&quot; SIZE=2 COLOR=#000000>MSISDN Number</FONT></B>
</TD>
<TD ALIGN=middle WIDTH=10>
<B><FONT FACE=&quot;Comic Sans MS&quot; SIZE=2 COLOR=#000000>:</FONT></B>
</TD>
<TD>
<INPUT name=&quot;fldNDC&quot; onbeforepaste=&quot;restrict('NDC');&quot; value=&quot;&quot; onkeypress=&quot;restrict('NDC');&quot; ondblclick=&quot;restrict('NDC');&quot; style=&quot;HEIGHT: 22px; LEFT: 4px; TOP: 3px; WIDTH: 43px&quot; size=6 MAXLENGTH=5> &nbsp; <INPUT name=&quot;fldMSISDN&quot; onbeforepaste=&quot;restrict('MSISDN');&quot; value=&quot;&quot; onkeypress=&quot;restrict('MSISDN');&quot; ondblclick=&quot;restrict('MSISDN');&quot; style=&quot;HEIGHT: 22px; WIDTH: 113px&quot; size=14 MAXLENGTH=10>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<BR><BR>
</TD>
</TR>
<TR>
<TD ALIGN=middle>
<INPUT TYPE=button value=&quot;Open&quot; name= tbOpen onclick=&quot;tbOpen_click();&quot;>
</TD>
<TD ALIGN=middle COLSPAN=2>
<INPUT id=tbClear TYPE=submit value=&quot;Clear&quot; name=tbClear >
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML> Programming is like sex: one mistake and you have to support it for the rest of your life.
 
Hi there,

you can't include one document in another like that!

What you need to do is set the second document as just a nested table within your main document.

You can then specify all the styles in that one CSS.

Here is the above code with the second document header removed. Just double check it cos I onl skipped through it.

<HTML>
<HEAD>
<TITLE>Proximus Tariff Check-up Application - Menu</TITLE>
<link rel=&quot;stylesheet&quot; href=&quot;table4.css&quot;>
</HEAD>
<BODY>
<FORM name=&quot;frmEurekaMenu&quot; METHOD = &quot;post&quot;>
<INPUT type=hidden name=&quot;link_clicked&quot; >
<INPUT type=hidden name=&quot;ConfirmBulkTariffOK&quot; >
<INPUT type=hidden name=&quot;butOpen&quot; >
<TABLE cellSpacing=0 cellPadding=0 width=&quot;850&quot; border=0 style=&quot;HEIGHT: 480px; WIDTH: 850px&quot; align=left>
<TR>
<TD WIDTH=175>
<IMG alt=Tariff Check-up src=&quot;./SilverStream/Objectstore/Images/Logo.jpg&quot;>
</TD>
<TD>
<TABLE style=&quot;HEIGHT: 100px; WIDTH: 544px&quot; cellSpacing=0 cellPadding=0 width=544 border=0 ALIGN=center>
<TR>
<TD ALIGN=middle>
<STRONG><font color=&quot;#400080&quot; size=&quot;5&quot; face=&quot;Comic Sans MS&quot;>Proximus Tariff Check-up Application</font></STRONG>

</TD>
</TR>
<TR>
<TD ALIGN=middle>
<STRONG><EM><font size=&quot;4&quot; face=&quot;Comic Sans MS&quot;>Tariff Check-up Menu</font></EM></STRONG>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD VALIGN=center>


<!-- THIS IS THE SECOND TABLE -->


<table width=&quot;138&quot; border=&quot;0&quot; align=&quot;left&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td height=&quot;13&quot;>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;><a href=&quot;#&quot;>:: New Optimisation :: </a></div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Request History ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Bulk Tariff Sheet ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Online Swap ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;><a href=&quot;#&quot;>:: Temporary group :: </a></div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: User Profile ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Usage Summary ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;><a href=&quot;#&quot;>:: Finalise Request :: </a></div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;> </div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;>:: Save Request ::</div>
</td>
</tr>
<tr>
<td>
<div align=&quot;left&quot;></div>
</td>
</tr>
</table>


<!-- END OF SECOND TABLE -->



</TD>
<TD ALIGN=middle VALIGN=center>
<TABLE style=&quot;HEIGHT: 91px; WIDTH: 322px&quot; cellSpacing=0 cellPadding=0 width=322 border=0 align=center>
<TR>
<TD ALIGN=left>
<B><FONT FACE=&quot;Comic Sans MS&quot; SIZE=2 COLOR=#000000>Account Number</FONT></B>
</TD>
<TD ALIGN=middle WIDTH=10>
<B><FONT FACE=&quot;Arial&quot; SIZE=2 COLOR=#000000>:</FONT></B>
</TD>
<TD>
<INPUT name=&quot;fldAccountNumber&quot; onbeforepaste=&quot;restrict('AccountNumber');&quot; value=&quot;&quot; onkeypress=&quot;restrict('AccountNumber');&quot; ondblclick=&quot;restrict('AccountNumber');&quot; style=&quot;HEIGHT: 22px; WIDTH: 169px&quot; size=15 MAXLENGTH=8>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<BR>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<FONT FACE=&quot;Comic Sans MS&quot; SIZE=1 COLOR=#000000> OR </FONT>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<BR>
</TD>
</TR>
<TR>
<TD ALIGN=left>
<B><FONT FACE=&quot;Comic Sans MS&quot; SIZE=2 COLOR=#000000>MSISDN Number</FONT></B>
</TD>
<TD ALIGN=middle WIDTH=10>
<B><FONT FACE=&quot;Comic Sans MS&quot; SIZE=2 COLOR=#000000>:</FONT></B>
</TD>
<TD>
<INPUT name=&quot;fldNDC&quot; onbeforepaste=&quot;restrict('NDC');&quot; value=&quot;&quot; onkeypress=&quot;restrict('NDC');&quot; ondblclick=&quot;restrict('NDC');&quot; style=&quot;HEIGHT: 22px; LEFT: 4px; TOP: 3px; WIDTH: 43px&quot; size=6 MAXLENGTH=5> <INPUT name=&quot;fldMSISDN&quot; onbeforepaste=&quot;restrict('MSISDN');&quot; value=&quot;&quot; onkeypress=&quot;restrict('MSISDN');&quot; ondblclick=&quot;restrict('MSISDN');&quot; style=&quot;HEIGHT: 22px; WIDTH: 113px&quot; size=14 MAXLENGTH=10>
</TD>
</TR>
<TR>
<TD COLSPAN=3>
<BR><BR>
</TD>
</TR>
<TR>
<TD ALIGN=middle>
<INPUT TYPE=button value=&quot;Open&quot; name= tbOpen onclick=&quot;tbOpen_click();&quot;>
</TD>
<TD ALIGN=middle COLSPAN=2>
<INPUT id=tbClear TYPE=submit value=&quot;Clear&quot; name=tbClear >
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>

</BODY>
</HTML>




É

endamcg-logo1b.gif

 
you can't nest HTML pages within each other, you may wanna use an iframe for what you are trying to achieve
 
Hi,

Why can't I nest HTML pages? I works fine, you should try it. Just code the html code into your editor and watch it in your browser.

Sjravee, Thanks for that. I hadn't touhgt about that. That will probably work.

Programming is like sex: one mistake and you have to support it for the rest of your life.
 
As you have proved with your code, browsers are forgiving. It may work visually however my only concern would be if other people saw your code and actually thought this was valid HTML architecture. The problems will probably occur if you attempted to add script to this page, i havent tried it but I would be amazed if you didnt come across any problems.

My advice would be to do it correctly!

I have to admit i didnt expect this code to render in Netscape 4 but it did!
 
Hi,

NO you can't nest pages, ti may look ok to you but probably wont in other browsers. Not only is it against the law but it's a mortal sin! Don't do it!
Anyway, there's no reason why you need to do it. In your example above you just need to add the table code into the main page, NOT the whole document!!


É

endamcg-logo1b.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top