Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL ..

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Best Hosting Site ?  
Author Message
ineverreadanyt

External


Since: Jan 15, 2004
Posts: 2



(Msg. 1) Posted: Thu Jan 15, 2004 1:24 pm
Post subject: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL HTML?
Archived from groups: alt>www>webmaster (more info?)

Greetings. I want to localize a style definition to a portion of an
HTML document, but use an external stylesheet. It seems that I can
only do
<style><!-- @import url(styles/my_style.css);--></style>
and <link rel=stylesheet href=styles/my_style.css type=text/css>
in the header, which applies to the entire HTML document and is NOT
what I want to do.

This does not seem to work:
<span style = @import url('styles/my_style.css');>
... some ...
... HTML ...
</span>

Nor does this:
<span>
<!-- @import url('styles/my_style.css'); -->
... some ...
... HTML ...
</span>

How do I "import" an external stylesheet at the inline or block level?
Thx!

 >> Stay informed about: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL .. 
Back to top
Login to vote
gary1

External


Since: Jul 01, 2003
Posts: 50



(Msg. 2) Posted: Fri Jan 16, 2004 5:29 am
Post subject: Re: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL HTML? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <e4c916dd.0401151024.2625c2bf RemoveThis @posting.google.com>,
IneverReadAnythingSentToMe RemoveThis @hotmail.com says...
 > Greetings. I want to localize a style definition to a portion of an
 > HTML document, but use an external stylesheet. It seems that I can
 > only do
 > <style><!-- @import url(styles/my_style.css);--></style>
 > and <link rel=stylesheet href=styles/my_style.css type=text/css>
 > in the header, which applies to the entire HTML document and is NOT
 > what I want to do.
 >
 > This does not seem to work:
 > <span style = @import url('styles/my_style.css');>
 > ... some ...
 > ... HTML ...
 > </span>
 >
 > Nor does this:
 > <span>
 > <!-- @import url('styles/my_style.css'); -->
 > ... some ...
 > ... HTML ...
 > </span>
 >
 > How do I "import" an external stylesheet at the inline or block level?

Can't quite see how you even got to trying to import at inline level...

Anyway, why not just create a class within styles/my_style.css and then
apply it using the span:

<span class="toprow">
....
</span>

If you have included a link to the .css at the top of every page, then
for most users, the .css will be cached after the first page they visit,
whether you actually call a style from it on that page or not.

Maybe you could explain what exactly you are trying to achieve...

Gazza<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL .. 
Back to top
Login to vote
davidvb3

External


Since: Nov 10, 2003
Posts: 272



(Msg. 3) Posted: Fri Jan 16, 2004 11:51 am
Post subject: Re: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL HTML? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David Filmer wrote:

 > How do I "import" an external stylesheet at the inline or block level?

You can't, but you could try this:

1. For the block level, put the markup you want in a div with a unique
id, and do the same with span if inline.
2. Use this css:

#idname>.element {

}

or

#idname .element {

}

This will mean that the styling of .element will only be applied to
elements that have that particular class and are children of #idname.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL .. 
Back to top
Login to vote
ineverreadanyt

External


Since: Jan 15, 2004
Posts: 2



(Msg. 4) Posted: Fri Jan 16, 2004 2:42 pm
Post subject: Re: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL HTML? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 >
 > Maybe you could explain what exactly you are trying to achieve...
 >

Hi, thanks for the feedback. I do think that prehaps I should clarify
my intent a bit.

I'm working on a Boy Scout website. If you have a look at my current
site, <a style='text-decoration: underline;' href="http://troop606.com," target="_blank">http://troop606.com,</a> you will see that the mainpage includes a
snippet of the Troop calendar. The current calendar does not employ
stylesheets.

I'm working on a new version of the site that uses the open-source
"Plans" calendar (http://planscalendar.com/demo) which is rather
highly styled (http://planscalendar.com/demo/theme/plans.css). I want
to also include a snippet of this calendar on my site's mainpage (same
as I do with <a style='text-decoration: underline;' href="http://troop606.com" target="_blank">http://troop606.com</a>). I don't want my snippet to be
dependent on changes that I make to the Plans .css file (which may not
be compatible with (or may be overwritten by) future versions of
Plans). I don't know how to apply the stylesheet to ONLY the calendar
snippet (and not the rest of the mainpage).

The calendar snippet HTML and the .css are from Plans. All I'm trying
to do is extract a portion of that HTML (which I know how to do) and
display it on my mainpage, with the .css applied (which I don't know
how to do).

I would very much appreciate any assistance.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How to use EXTERNAL stylesheets for INLINE or BLOCK-LEVEL .. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
block ip? - I just noticed this link in my Cpanel. Why would I want to do this? Does this work like a robots.txt to block crawlers etc. If I know their IP? Heidi -- Now playing: Winamp stopped Recommended Hosting: http://www.page-zone.com/..

Block Asia Pacific Network? - I have a website for my service business that is very localized and I only attract (and need) clients from my own state. However, I am getting spambot hits everyday from the Asia Pacific network. I was thinking about using the ..htaccess file to just..

Internet Explorer privacy options to block cookies - Interesting discussion about blocking cookies in the previous thread. Consensus seems to be that lots of webmaster, internet pros will do this (block) but not too many others (in % terms, probably still many as a number of people). I conclude I'm not..

Tracking clicks on external links - redir.pl problem - Hi, we host advertising on our site & have been using redir.pl script to track clicks on our advertiser's sites. This had been working fine until an advertiser told us that our site did not appear at all as a referrer in their WebTrends log analysis...
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]