Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / October 2004



Tip: Looking for answers? Try searching our database.

How do I select the BODY tag in a specific FRAME in a FRAMESET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Blake West - 27 Oct 2004 19:28 GMT
Is there a way to write a CSS selector to point to the body tag in a
specific frame?

The frameset HTML looks like this. I only want to select the BODY tag
in the frame named "navbar" and then apply styles to that element.

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
CHARSET=iso-8859-1">
<TITLE>My Frameset</TITLE>
</HEAD>
<FRAMESET framespacing="3" cols="190,*">
<FRAME bordercolor="#3D5FA3" name="navbar" title="Navigation"
src="navbar.html" marginheight="0" marginwidth="0" scrolling="auto"
border="1">
<FRAME name="viewer" title="Contents" src="centents.html"
scrolling="auto">
<NOFRAMES>
<BODY>
<P>This page uses frames, but your browser doesn't support them.</P>
</BODY>
</NOFRAMES>

</FRAMESET>
</HTML>

Thanks,
Blake
Els - 27 Oct 2004 19:35 GMT
> Is there a way to write a CSS selector to point to the body
> tag in a specific frame?
[quoted text clipped - 26 lines]
> Thanks,
> Blake

In navbar.html you have <body>, and that's where you apply the
styles. I'm imagining you use a seperate stylesheet, so you'd
have to add a class to that <body> element. Just like you
would to any other element.

Oh, and btw, you could try losing the frames.
I've heard they're evil :-)
http://www.google.com/search?q="frames+are+evil"

Signature

Els                     http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
                            - Renato Russo -
Now playing: A-HA - Hunting High And Low

Michael Winter - 27 Oct 2004 20:00 GMT
>> Is there a way to write a CSS selector to point to the body tag in a  
>> specific frame?

Stylesheets only apply to the document that contains them. Add the LINK  
(or STYLE, if you must) element to the file in that frame, and style as  
required.

  body {
    /* ... */
  }

[snip]

> Oh, and btw, you could try losing the frames.
> I've heard they're evil :-)
> http://www.google.com/search?q="frames+are+evil"

Try:

  <URL:http://www.google.com/search?q=%22frames+are+evil%22>

 :)

Mike

Signature

Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.

Harlan Messinger - 27 Oct 2004 19:55 GMT
> Is there a way to write a CSS selector to point to the body tag in a
> specific frame?
>
> The frameset HTML looks like this. I only want to select the BODY tag
> in the frame named "navbar" and then apply styles to that element.

Styles defined in a frameset document only apply to content inside the
NOFRAMES element. The appearance of the document in each frame is governed
by the styles defined in the document.
Jan Roland Eriksson - 27 Oct 2004 21:45 GMT
>Is there a way to write a CSS selector to point
>to the body tag in a specific frame?

What's with this sudden obsession with a stone age technique here in
this NG?

>...frameset HTML looks...only want to select the BODY tag
>in the frame named "navbar"...

Formally you don't select tags, CSS selectors selects elements and
applies formatting style rules to the content of matching elements and
optionally also to the containing box that is created for an element.

You will never develop a good understanding of how CSS is meant to work
unless you first develop an understanding of how markup is meant to
work.

[...]

><BODY>
><P>This page uses frames, but your browser doesn't support them.</P>
></BODY>

Either you are joking or trolling. Either way, learn that what my
browser(s) can, and can not, do is none of your business.

This is your next exercise; search Google for the exact quoted line...

"This page uses frames, but your browser doesn't support them"

I got 3260000 hits and I could easily bet my bottom dollar on every one
of those URL's to represent something equally clueless and useless.

Framed sites are the enemies of search engines.
Framed sites can not be properly book marked.
Framed sites are the enemy of one of the best browsers in the world.
Framed sites should not be created given available techniques of today.

Go here, grab a bit of knowledge and allow yourself to be amazed...

 <http://webhost.bridgew.edu/etribou/layouts/>

Signature

Rex

Alan J. Flavell - 27 Oct 2004 22:22 GMT
>  "This page uses frames, but your browser doesn't support them"
>
> I got 3260000 hits and I could easily bet my bottom dollar on every
> one of those URL's to represent something equally clueless and
> useless.

Some of them are tutorials warning against such nonsense!

SCNR.
Neal - 27 Oct 2004 22:41 GMT
> <NOFRAMES>
> <BODY>
> <P>This page uses frames, but your browser doesn't support them.</P>
> </BODY>
> </NOFRAMES>

<noframes>
    <body>
        <h1>The Wacky Doodle Website</h1>
        <p>Thanks for visiting! Here's a site map of what we have to offer.</p>
        <p>Click away, sucker!!1!11!!ELEVEN!!</p>
        <ul>
            <li><a href="wacky.html">Wacky</a></li>
            <li><a href="doodle.html">Doodle</a></li>
            <li><a href="dacky.html">Dacky</a></li>
            <li><a href="woodle.html">Woodle</a></li>
        </ul>
    </body>
</noframes>

What is wrong with doing that???

"Oh, no, you don't have frames, get the hell out! Scram!!"
Blake West - 28 Oct 2004 15:10 GMT
To clarify:

I'm an end user stuck using three instances of Microsoft Outlook Web
Access for work. One for my employer and two for different clients.
They all look the same, and I keep getting confused.

I use Firefox and can apply user-defined styles based on a domain. So
I wanted to style each email interface differently so I could tell
them apart. The stylesheet is not referenced by any of the pages,
frameset page or content pages, but is instead applied by the browser.
I'm just trying to apply a particular end-user style sheet.

I think there has to be a way to use CSS selectors to point to the
content in a specific frame. If I figure it out, I'll post it back
here.

Microsoft is the one that uses the frames, not me.

Thanks for the comments.

-Blake
Lauri Raittila - 28 Oct 2004 15:36 GMT
Blake West wrote;
> To clarify:

> I use Firefox and can apply user-defined styles based on a domain. So
> I wanted to style each email interface differently so I could tell
> them apart. The stylesheet is not referenced by any of the pages,
> frameset page or content pages, but is instead applied by the browser.
> I'm just trying to apply a particular end-user style sheet.

Yes, sometimes websites just must be fixed clientside. How does one set
up FF to have domain specific stylesheet?

> I think there has to be a way to use CSS selectors to point to the
> content in a specific frame.

Not possible. That doesn't mean that you can't do what you want...

> If I figure it out, I'll post it back
> here.

There must URLs in those files, that differ from one another, but stay
always same? Or something other unique stuff?
You can style using them. In firefox, you can also use some CSS3
selectors, which makes it easier.

a[href="example.example/?foobar"] {color: red;}

for

<a href="example.example/?foobar">adfs</a>

My dated page
http://www.student.oulu.fi/~laurirai/www/css/userstyles/

(examples don't work anymore)

Another good bet is body[onload="whatever"]

Havent tested userstyle exept in Opera 6+

> Microsoft is the one that uses the frames, not me.

Which you should have said in the firstplace. Because it changes
everything. In here, as this is www.authoring in group name, we always
assume web authoring, unless otherwise mentioned. Especially when post
looks like it was done by newbie.


Signature

Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>

Blake West - 29 Oct 2004 03:52 GMT
Lauri Raittila <lauri@raittila.cjb.net> wrote...
> Yes, sometimes websites just must be fixed clientside. How does one set
> up FF to have domain specific stylesheet?

Use the uriID extension (I'm using Firefox 1.0PR)
http://extensionroom.mozdev.org/more-info/uriid

I wound up just settling with applying the following styles in my
userContent.css file:

body#mail-urlnumberone-com {background-color:red;}
body#mail-urlnumbertwo-com {background-color:green;}
body#mail-urlnumberthree-com {background-color:black;}

These styles get applied to the body tags in both frames. It would
look better if I could just apply the styles to one of the two frames,
but I'm happy with the solution.

My co-worker that uses IE is a little jealous.

BTW folks seem to be kinda touchy about the whole frames thing.
Andreas Prilop - 28 Oct 2004 15:37 GMT
> Microsoft is the one that uses the frames, not me.

I couldn't find "frameset" in line 1 of the source text of
http://www.microsoft.com .

Signature

Top-posting.
What's the most irritating thing on Usenet?

Andreas Prilop - 28 Oct 2004 13:11 GMT
> <NOFRAMES>
> <P>This page uses frames, but your browser doesn't support them.</P>
> </NOFRAMES>

ALT="This page uses images, but your browser doesn't support them."

Signature

Top-posting.
What's the most irritating thing on Usenet?

Alan J. Flavell - 28 Oct 2004 13:24 GMT
> > <NOFRAMES>
> > <P>This page uses frames, but your browser doesn't support them.</P>
> > </NOFRAMES>
>
> ALT="This page uses images, but your browser doesn't support them."

I'd re-word it more like "This page uses frames, but our web deezyner
doesn't understand how to support them".
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.