Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS Skipping...

CSS Skipping...
Thread Tools
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 8, 2004, 01:45 AM
 
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
Reply With Quote
Jul 8, 2004, 01:53 AM
 
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>
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 8, 2004, 01:57 AM
 
How?
     
Grizzled Veteran
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jul 8, 2004, 02:00 AM
 
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.
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 8, 2004, 02:05 AM
 
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
Reply With Quote
Jul 8, 2004, 02:12 AM
 
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.
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 8, 2004, 02:18 AM
 
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
Reply With Quote
Jul 8, 2004, 02:26 AM
 
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.
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 8, 2004, 02:31 AM
 
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
Reply With Quote
Jul 8, 2004, 02:36 AM
 
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
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 8, 2004, 02:45 AM
 
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
Reply With Quote
Jul 8, 2004, 02:45 AM
 
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.
     
l008com  (op)
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jul 8, 2004, 02:53 AM
 
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
Reply With Quote
Jul 8, 2004, 03:07 AM
 
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
Reply With Quote
Jul 8, 2004, 09:39 AM
 
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.
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:40 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2