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

Help - Style Sheets not Cooperating 1

Status
Not open for further replies.

joecdn

Programmer
Oct 28, 2003
47
CA
I have a file that doesn't seem to display any of the info from the style sheet, but yet when I look at it in Dreamweaver, everything seems to be there. It might be because I got rid of the style sheet and then brought it back in again, but the reason I did that was because part of the page wasn't cooperating, I picked a particular style for a link in a table that's suppose to be different then the link on my menu, but it seems to still use the same as what's displayed on my menu ... it's very frustrating. Anyway, if anyone has some insight, that would be great.

Thanks in advance.
 
Can you post the header of your page, particularily the link to the style sheet?


Take Care,
Mike
 
Here it is ...

<%@LANGUAGE=&quot;VBSCRIPT&quot; CODEPAGE=&quot;1252&quot;%>
<html>
<head>
<!-- TemplateBeginEditable name=&quot;doctitle&quot; -->
<title>Nu-Leaf Marketing Group</title>
<!-- TemplateEndEditable -->
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf(&quot;#&quot;)!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<!-- TemplateBeginEditable name=&quot;head&quot; --><!-- TemplateEndEditable
<link href=&quot;/basic.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;> -->
<link href=&quot;/basic.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>
</head>

Hope you can figure this out ... I'm at a loss
 
There are only two things I could think of:

1) remove the first occurence:
Code:
<!-- TemplateBeginEditable name=&quot;head&quot; --><!-- TemplateEndEditable 
<link href=&quot;/basic.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;> -->
<link href=&quot;/basic.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>

To read:
Code:
<!-- TemplateBeginEditable name=&quot;head&quot; --><!-- TemplateEndEditable -->
<link href=&quot;/basic.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>

2) Is basic.css really at the root level of your site, or is it in an includes directory? Usually I save my css files in an include directory like:
Code:
<link href=&quot;/includes/basic.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>
While that won't have any impact on functionality, make sure that you have the correct path included.

Looking at the code, I believe the first one broke it: the first link tag was inside the comment templates tag, that might have broken things.

Let me know if that didn't fix it.

Take Care,
Mike
 
Hey Mike,

Thanks for your help. I tried doing that and now none of the screens are working with the style sheet. Could it be because I saved one of them as a template and it's kind of screwing things up? Is there a way I can get rid of the template?
 
That depends. If you build the other pages off of the template then you need to update all the other pages asscoiated with the template. If you only made this one page from the template, then you should go back and dis-associate it from the template, or save it as a normal page by taking out all the template tags and doign a 'Save As...'.

All the syntax is correct on your page, so I'm pretty sure it has something to do with your template.

Take Care,
Mike
 
OK, Mike here's another question. I got rid of the template and that seemed to have worked ... BUT. I'm still having trouble with one of my links. I have a link that is using the <a> style in my style sheet. I don't want it to use that particular one for a couple reasons. 1) It doesn't match 2) Whne it displays, it displays as blank until you move the mouse over it. Anyway, here's the line of code it's affecting:

<td align=&quot;left&quot; valign=&quot;middle&quot;><a href=&quot;/Nu-Leaf/visit.asp?VisitDate=<%= rs.Fields(&quot;cnumber&quot;).Value %>&quot;><%= rs.Fields(&quot;cnumber&quot;).Value %></a></td>

The ASP portion works, it's the display. What I want is to use a completely different syle. This is the one I wanted to use:

.storelink {
FONT-SIZE: 13px;
COLOR: #0;
right: auto;
font-weight: bold;
font-family: Geneva, Arial, Helvetica, sans-serif;
}

How can I incorporate it into that first line of code? Hopefully this makes sense.

Thanks in advance
 
<td align=&quot;left&quot; valign=&quot;middle&quot;><a class=&quot;storelink&quot; href=&quot;/Nu-Leaf/visit.asp?VisitDate=<%= rs.Fields(&quot;cnumber&quot;).Value %>&quot;><%= rs.Fields(&quot;cnumber&quot;).Value %></a></td>

That should work **crosses fingers**.

Take Care,
Mike
 
Thanks Mike,

At first it didn't work, but I figured out why. It was a combination of putting that code in and some other code in the style sheet I needed to add. I forgot about the a:hover, a:visit, a:link. I created 3 others called a.storelink:hover, a.storelink:visit and a.storelink:link and now it works fine.

So, thanks again for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top