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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

associating css to asp pages

Status
Not open for further replies.

diarratech

Technical User
Jul 7, 2000
41
FR
I have a problem with associating my css style sheet to any asp pages.
First of all, here is how everything is organized:
I have a top page called “top.asp”. This is where I put the title of my site.
I have also a left page called “left.asp”. This is where I put my menu.
Lastly, I have an index page (index.asp) where I call all my pages (left.asp, top.asp… or other asp pages such as introductory pages or photo pages…)


Here is how I setup the index page:

<!--#include file="Connections/con.asp" -->
<%
sMiddle = request.querystring("milieu")
%>
<HTML><HEAD><TITLE>Menu</TITLE></HEAD>
<BODY bgcolor="#ffffff">
<table width="100%" border="0">
<tr>
<td colspan="3">
<!-- TOP //-->
<!--#include file="top.asp" -->
</td>
</tr>
<tr>
<td valign="top" width="14%" rowspan="2">
<!-- Left //-->
<!--#include file="left.asp" -->
</td>
<td width="68%" valign="top">
<tr>
<td valign="top">
<% Select Case sMiddle %>
<% case "", "middleIntro" %>
<!--#include file="millieuIntro.asp" -->
<% case "middlePicture" %>
<!--#include file="Photos/PhotoIndex.asp" -->
<% case else %>
<!--#include file="404.asp" -->
<% End Select %>
</td>
</tr>
</table>
</td>

The scenario is simple, any page goes through the index page first and the select case (sMiddle ) will determine which page to show.

For instance, let’s say there is a link for photo page in the left menu, my hyperlink will be : index.asp?middle= middlePicture

Now, here is my problem, let ‘s say I have a table in my photo page (PhotoIndex.asp) and that I associate the css file to the table only, anytime I called that page or refresh that page, the css style will be associated with all the website which is also made up of table.
How can I simply associate a css file to ONLY that following table.

Ex: PhotoIndex.asp

<table border="0" align="center" >
<tr>

<td> <div align="center">

</tr>
</table>
 
You need to give the table an ID or a Class to separate it from the others.
Code:
<table class='ApplyThisStyle'>
 
thank you for your help! I will try this today
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top