|
Posted by Barbara de Zoete on 12/04/05 12:53
On Sun, 04 Dec 2005 10:51:27 +0100, Curtis <nospam@nohow.not> wrote:
> uranther <apoc_gfx@yahoo.com> wrote in message
> news:pan.2005.12.04.03.01.50.598799@yahoo.com...
>> id is for one-time use only. class is for more than
>> one-time use only.
>> You can select both like so: <div id="special"
>> class="global"> and that
>> is very useful for cutting and tightening your CSS.
>
> Not sure I follow you--I probably need some examples.
Say you have a stylesheet for screen and one for printing. There are
certain parts of your page you don't want printed (like the meny, or
blocks with advertising, stuff like that). You also have parts in your
page that are unique (for every individual page), like a block containing
the navigation or a block containing the header of the page. What you
could do:
markup:
<body>
<div id="header">
<!-- content that makes up your pages header -->
</div>
<div id="content">
<!-- content that is actually the content of the page -->
</div>
<div id="nav">
<!-- the list with links for navigating the site -->
</div>
<div id="ads">
<!-- the third party advertising -->
</div>
</body>
Now, to avoid the 'nav' and 'ads' getting printed you could put in you
print style sheet:
#nav, #ads {
top:-1200px;
left:-1200px }
The more you get stuff that you don't want printed, the more extended that
list of id selectors and class selectors will get. You could also create
one class, like 'noprint' with the same properties, and add that one class
to all the elements that you don't want printed. With the <div id="nav">
and <div id="ads"> you would in that case get both an id and a
[class="noprint"].
Whenever you have some generic styles that you want to be able to attach
to what ever element, you can use a class and add that class where you
need it. You can combine classes, you can combine a class with an id. Just
be aware of what the cascade does with the styles, how one influences the
other, which has preference over the next, et cetera.
BTW: you use Outlook as your news client. It doesn't deal with signature
blocks very well (amongst other things). When you send a post, it deletes
the space after the dash dash that makes a correct signature seperator.
That means it is not properly seperated from the content. Also other
participants in newsgroups, as they reply to you, have to delete the
signature block by hand. Both are undesireable.
So, unless you use a proper news client (or something that is called
'quotefix'; google for that) you best _not_ add a signature block, because
it isn't a real one.
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Navigation:
[Reply to this message]
|