Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
second css doesn't work!
Old 08-29-2006, 11:21 PM second css doesn't work!
Average Talker

Posts: 16
Trades: 0
It my codes:
link to an external stylesheet,this stylesheet import another style sheet.

Code:
<html>
<head>
     <style type="text/css">
   ...
</style>
<link rel="stylesheet" type="text/css" href="first.css">
</head>
<body>

   
<p class="ridge">....</p>
<p class="inset">...</p>
<p class="uppercase">...<p>  <!---never works! please help>
...
</body>
</html>
my first.css is
Code:
p.ridge {border-style: ridge}
p.inset {border-style: inset}
@import url(second.css)
my second.css is
Code:
p.uppercase {text-transform: uppercase}
p.lowercase {text-transform: lowercase}
It seems p.uppercase in second.css doesn't work!

thank you in advance!
zhshqzyc is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-30-2006, 08:51 AM Re: second css doesn't work!
menerweb's Avatar
Extreme Talker

Posts: 150
Trades: 0
Quote:
Originally Posted by zhshqzyc View Post
Code:
<html>
<head>
     <style type="text/css">
   ...
</style>
<link rel="stylesheet" type="text/css" href="first.css">
</head>
<body>
 
 
<p class="ridge">....</p>
<p class="inset">...</p>
<p class="uppercase">... </p>  
...
</body>
</html>
You should not use <p> for ending the paragraph, you should use </p>.

I hope that it helps you.
__________________
Portfolio:
Please login or register to view this content. Registration is FREE
| About Forex:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
menerweb is offline
Reply With Quote
View Public Profile Visit menerweb's homepage!
 
Old 08-30-2006, 09:02 AM Re: second css doesn't work!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
where does second.css come in to the picture??

it isn't in the code you posted.

<edit>

I see it is. But in the wrong place. @import has to be the first rule in a stylesheet
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 08-30-2006 at 09:07 AM..
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-30-2006, 09:20 AM Re: second css doesn't work!
Average Talker

Posts: 16
Trades: 0
hi,menerweb:

In my original post, it should be </p> instead of <p>.
It's a typing error. it still doesn't work.

chrishirst:

I can't capture your meaning.
I believe that it doesn't matter if @import has to be the first rule in a stylesheet.
zhshqzyc is offline
Reply With Quote
View Public Profile
 
Old 08-30-2006, 09:28 AM Re: second css doesn't work!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
In the CSS specifications @import rules should precede any other CSS rules in the stylesheet.

Assigning property values, Cascading, and Inheritance
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-30-2006, 09:52 AM Re: second css doesn't work!
Average Talker

Posts: 16
Trades: 0
well, I have put it as the first rule. but it still doesn't work.

let me put the code again

Code:
<html>
<head>
     <style type="text/css">
   h1 {color:blue; text-align: left; font-family: times}
   .under {text-decoration: underline}
   li {color: green; text-decoration: underline}
   span {font-size: 0.7em}
   .super{position: relative; top: -1ex}
   body {background-color: yellow}
   
 p:first-line 
{
color: #ff0000;
font-variant: small-caps
}
   
   p:first-letter 
   {
   color: #0f0f00;
   font-size:x-large
   }
div 
{
background-color:#00FFFF;
width:100px;
height:150px;
}
</style>
<link rel="stylesheet" type="text/css" href="first.css">
</head>
<body>

   
<h1 class="under">
 Measurable Outcomes
</h1>
<img src="000.jpg" style="position: absolute; top: 300px; left: 350px; z-index: 1">
<ul>
  <li>Code HTML, CSS, JavaScript, Perl, XML, DTDs, and XML schemas.</li>
  <li>Use CGI, ODBC, cookies, server-side includes, the DOM APIs, and Web services.</li>
  </ul>
<p class="ridge">xxx.</p>
<p class="inset">xxx.</p>
<p class="uppercase">xxx.</p>
<div> aaa<span class="super">yyy</span> zzz</div>
</body>
</html>

my first.css is
Code:
@import url(second.css)
p.ridge {border-style: ridge}
p.inset {border-style: inset}
my second.css is
Code:
p.uppercase {text-transform: uppercase}
p.lowercase {text-transform: lowercase}
thanks
zhshqzyc is offline
Reply With Quote
View Public Profile
 
Old 08-30-2006, 10:06 AM Re: second css doesn't work!
menerweb's Avatar
Extreme Talker

Posts: 150
Trades: 0
Code:
 
@import url(second.css);
p.ridge {border-style: ridge}
p.inset {border-style: inset}
Maybe this solves.
__________________
Portfolio:
Please login or register to view this content. Registration is FREE
| About Forex:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
menerweb is offline
Reply With Quote
View Public Profile Visit menerweb's homepage!
 
Old 08-30-2006, 10:16 AM Re: second css doesn't work!
Average Talker

Posts: 16
Trades: 0
yes, it works.
have a great day.
zhshqzyc is offline
Reply With Quote
View Public Profile
 
Old 08-30-2006, 10:39 AM Re: second css doesn't work!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Also you wont even notice the change to uppercase as you have;

p:first-line
{
color: #ff0000;
font-variant: small-caps
}
and there is only the one line in each of the <p> elements.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-30-2006, 10:42 AM Re: second css doesn't work!
menerweb's Avatar
Extreme Talker

Posts: 150
Trades: 0
Quote:
Originally Posted by zhshqzyc View Post
yes, it works.
have a great day.
Thanks, you too.
__________________
Portfolio:
Please login or register to view this content. Registration is FREE
| About Forex:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
menerweb is offline
Reply With Quote
View Public Profile Visit menerweb's homepage!
 
Reply     « Reply to second css doesn't work!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34956 seconds with 12 queries