Home News Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Help With CSS (Class & Subclass?)


You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion

Help With CSS (Class & Subclass?)
Reply
 
Thread Tools
Old 22-11-2006, 10:09   #1
THE FUNKIEST ON THE BOARD
 
Join Date: Aug 2005
Location: Canvey Island, Essex
Services: SERVICES FROM 26/08/05 TV XL services 2MB BROADBRAND UNLIMITED TALK PACKAGE V+ Service (Since 18
Posts: 653
funkyCable has a spectacular aura about themfunkyCable has a spectacular aura about themfunkyCable has a spectacular aura about themfunkyCable has a spectacular aura about them
Help With CSS (Class & Subclass?)

HI

I have a CSS file which has a class which I would like to use how do I reference it on my HTML sheet?

I have this part that I want to reference which is part of another class

.t12subheader {
border:1px solid #285577; border-left:none; border-top:none;
background-color:#6CAAD9;

Any ideas or websites to point me in the right direction.
__________________
Overall Average Speed = approx 132171 Kbps, 2131.42 Mbps (on crack)
funkyCable is offline   Reply With Quote
Old 22-11-2006, 10:52   #2
cf.mega poster
 
Join Date: Oct 2006
Posts: 1,572
The Jackal has a bronzed appealThe Jackal has a bronzed appeal
The Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appeal
Re: Help With CSS (Class & Subclass?)

Oh my head hurts.....

After viewing the source of this page to try to remember how to do arty farty web design

<div class="yourclass">

?

---------- Post added at 10:52 ---------- Previous post was at 10:38 ----------

Prolly a good place to start : http://www.w3schools.com/css/default.asp
__________________
The Jackal is offline   Reply With Quote
Old 22-11-2006, 16:38   #3
while(!naked){--clothes}
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,153
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: Help With CSS (Class & Subclass?)

funky cable

in your css whichever class you make this will be the same for all tags that has the same class id.

so as CrC said just in whichever tag have class="your class name"
<heading class"myClass"> or <span class="myClass"> etc

ik
__________________
Let me guess, you picked out yet another colorful box with a crank that I'm expected to turn and turn until OOP! big shock, a jack pops out and you laugh and the kids laugh and the dog laughs and I die a little inside.
ikthius is offline   Reply With Quote
Old 22-11-2006, 23:21   #4
is lurking
 
Jon M's Avatar
 
Join Date: Oct 2003
Location: Bracknell
Age: 30
Services: Freeview, NTL phone, NTL 4mbit BB SACM
Posts: 3,281
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Send a message via MSN to Jon M
Re: Help With CSS (Class & Subclass?)

From what you've put in your post, it sounds like the original css is a rather poorly laid out.
Referencing a class that is also part of another class is highly inefficient.

If it's a one off item in your page, you're far better off, and getting cleaner code if you combine an "id" and a "class" together, rather than redefine all the css that applies to it.
Rewriting code would make no sense if it already has css applied from elsewhere, you're doing the same work twice.

It's irritating that W3Schools haven't really touched on the usage of id's other than in the syntax as I am a big fan of their site.

( good example here: http://creativebits.org/webdev/div_id_vs_div_class )

Using this site above as an example.. I've rewritten the code to show you what I mean:

Code:
<html>
<!--CSS part:-->
<style type="text/css">
#myspecialtitle {color:green; text-decoration:underline}
.title {color:red; font: italic small-caps 900 1em arial}
.mylessefficienttitle {color:blue; font: italic small-caps 900 1em arial; text-decoration:underline}
</style>
<!--HTML part:-->
<body>
<p class="title">my normal title</p>
<p class="mylessefficienttitle">my special title with everything duplicated</p>
<p id="myspecialtitle" class="title">my ID values override any conflicting inherited values</p>
</body>
</html>
Copy and paste this code over everything existing here: http://www.w3schools.com/css/tryit.a...me=trycss_font if you want to try it out.
__________________
Forum Etiquette | Anti-Spam
'slightly pious, very sanctimonious and far too serious'
information is not a property of matter, it's applied to matter by intelligence

Last edited by Jon M; 22-11-2006 at 23:44.
Jon M is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


All times are GMT. The time now is 21:59.


Links
Google
 
Web www.cableforum.co.uk


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2003 - 2008, Cable Forum.
(server1.cableforum.co.uk)