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

Stylesheets throw everything off?

Status
Not open for further replies.

jallard

Technical User
Apr 20, 2005
5
US
Hi,

Once again, I am working with an ill-created flash template from TemplateMonster.Com. The problem is that when they created all of the CSS as folows:
<style type="text/css">
<!--
img {
border: none;
}
.mten {
margin-left: 10px
}
.tah10 {
font-family: Tahoma;
font-size: 10px;
text-decoration: none;
color: #000000;
}
.tah11 {
font-family: Tahoma;
font-size: 11px;
text-decoration: none;
color: #000000;
}
.ver10 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
text-decoration: none;
color: #000000;
}
.ver11 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-decoration: none;
color: #000000;
}
.tah9 {
font-family: Tahoma;
font-size: 9px;
text-decoration: none;
color: #000000;
}
.ver9 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
text-decoration: none;
color: #000000;
}
-->
</style>

There are three in all. The problem is that when I create seperate stylesheets, such as "willamette-1.css, willamette-2.css, willamette-3.css," some of the elements are off. Case in point is the navigation bar, as seen here (These are my test pages to eventiually re-create everything in XHTML.)

Hereto, are the stylsheets between <head><link rel="stylesheet" type="test/css" href="willamette-1.css">
<link rel="stylesheet" type="test/css" href="willamette-2.css">
<link rel="stylesheet" type="test/css" href="willamette-3.css"></head>

Is there something that I am doing wrong and if so, what? Am I going to have to convert all pages to PHP? I am utterly confused?!? Thanks for your help
 
In the css file there is the lines <style type="text/css">{ }


These shouldnt be here.

All Style tags need to come out. All style tags opening
Code:
<style type="text/css"> (  )
and closing
Code:
</style>
tags should be removed


Go there to check your css file.

Ryan
 
ChrisHunt said:
Also, why have three seperate stylesheet files? Just put all your style declarations into one file
Normally this is true, however, there are good reasons for seperating css into different files...in order to feed different rules for v4 browsers, standards/modern IE browsers, and print media.
Code:
<link rel="stylesheet" type="text/css" href="basic.css" />
<style type="text/css">
   @import url(advanced.css);
</style>
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
I've had css crash older browsers such as netscape, so I put basic styling rules (font styles, etc) into a basic css file for all browsers, advanced css into an @import statement that v4 browsers ignore, and a third stylesheet for print rules.

And yes, it does make it harder to maintain! But not too much, and I feel it adds a lot to a site.

<marc>
 
There can be good reasons to use seperate files, but in this case the OP has his CSS arbitrarily split into three parts. That's just pointless.

I didn't mean to say that CSS should never be split into seperate files, just that you need a reason for doing so. Maybe I should have been clearer.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top