Previous Message
Next Message

What is aliasing a style, why is it useful, and how do I do it?

Sent by tony crockford on 17 July 2004 20:08


On Sat, 17 Jul 2004 18:42:36 +0100, Dave Holloway [EMAIL-REMOVED]> wrote:
> ThemeMagic wrote:
> 
> >a guy I work with (programmer) who doesn't have time to teach me but has time to point
> >me... says that I need to learn how to alias one CSS style to another so that I can make
> >some of my font styles pickup the def of another in another style sheet and thus just
> >change one to have them both change...
> >
> >
> >
> A little cryptic, but I *think* I know what you mean.
> 
> http://www.seess.co.uk/demos/2004-07-17/alias/

couldn't you do that by class combining?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>www.seess.co.uk / cascading style sheets / aliasing </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
/* This style applies to important P tags */
p.important{color:red;} 

/* This style makes them extra whatever */
p.extra {font-weight:bold}
</style>

</head>

<body>

<div id="description">
<p>This page demonstrates controlling two P tags with different classes.</p>

</div>


<div id="content">
  <p class="important">Hello there. This is important text.</p>
  <p class="extra important">Hello there. This is really important text.</p>
</div>

</body>


</html>
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: