 |
 |
CSS Skipping...
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
Is there a way, like using some special tag or something, that I can exclude a block of text from being effected by a given document's CSS file?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
Originally posted by l008com:
Is there a way, like using some special tag or something, that I can exclude a block of text from being effected by a given document's CSS file?
Yeah, you can assign that block of text to its own class. Something like this...
<head>
.text {
font-family: Arial, Helvetica, sans-serif;
color: #000000;
}
</head>
<body>
<div class="text">Some of your text info. will go here. Some of your text info.will go here.</div>
</body>
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
How?

|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
Originally posted by l008com:
How?
Sorry, I was editing my last post as you were typing. If you look at the first reply again it should help.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
Will that only override attributes that are specifically defined in the head tag? The main problem is that the page's default CSS messed up the size of a particular line of text that i want to match all my other pages that don't use CSS (the page with the CSS is a vBulletin forum like this, I'm just trying to write a block of header HTML that matches the rest of the site)
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
Originally posted by l008com:
Will that only override attributes that are specifically defined in the head tag? The main problem is that the page's default CSS messed up the size of a particular line of text that i want to match all my other pages that don't use CSS (the page with the CSS is a vBulletin forum like this, I'm just trying to write a block of header HTML that matches the rest of the site)
Yes, it only overwrites the text that is between the <div></div> tags (in the text example I have above) leaving the rest to be formatted by your master CSS file.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
No what I mean was, in your example, you didn't specify size in your "text" style, now if the pages default style has a smaller than normal size, is the text give the style "text" going to have a default normal size because size isn't specified, or, instead, does it default to the pages default?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
Originally posted by l008com:
No what I mean was, in your example, you didn't specify size in your "text" style, now if the pages default style has a smaller than normal size, is the text give the style "text" going to have a default normal size because size isn't specified, or, instead, does it default to the pages default?
It will take on the size of the master CSS if you don't specify the size. I know this isn't exactly what you were looking for but it may help.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
Well, I guess my next question is, is there a css size value that represents the default size of text in html?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
font: 12px verdana; for example. You can also use font-size, font-weight, font-family et al to format the look of the text.
Apply it to html,body for every bit of text (unless explicitly changed in other styles) or just in the style you want...
|
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
Is there a value for font-size that will match the default font size for html? If I use a specific point size, I'll never match exactly.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
I guess you could kinda work it backwards by removing the CSS from that page's text and then assigning a class to all the stuff that you want the CSS to format leaving the block you wanted unformatted at it's default. Just a thought, there might an easier way.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
The problem is, configuring a vB is infinitely complex, I'm not sure if I can change the page's setting, other than the block of html i insert at the top. I'll have another look and see...
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Aug 2002
Status:
Offline
|
|
Also, you could try setting the block you want to look like the default to a class to 16px and Times. I think that might get you close to what you want. But it may change depending on browser.
Safari: Times 16px
Fire Fox: Times 16px
Mac IE: Times 16px
IE6 PC: Times ?
Edit: An inline style could do it too...
<p style="font-family: "Times New Roman", Times, serif;font-size: 16px"
(Last edited by MallyMal; Jul 8, 2004 at 04:17 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status:
Offline
|
|
Originally posted by l008com:
Is there a value for font-size that will match the default font size for html? If I use a specific point size, I'll never match exactly.
.selector {
font-size: 1em;
}
One em is dead equal to the browser's default. It's better than using pixel sizes because every once in a while some new browser comes along with a different default size. Like Safari's public beta.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|