Frames, Framesets and CSS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • x

    Frames, Framesets and CSS



    Greetings everyone:

    I am trying to get CSS to work with a framed web page, but I cannot.

    Does anyone know the syntax required in a CSS specification
    to specify attributes of the frames?

    Ideally, I want to be able to change the border thickness, colour, etc.

    Additionally, does anyone know of some comprehensive examples/tutorial
    out there about how to use CSS?

    Thanks in advance for your assistance.

    -*- a puzzled and somewhat frustrated newcomer to CSS -*-


    This is what I have for the html (named sample.html):

    vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvvvvvvvv
    <!doctype html public
    "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd"[color=blue]
    >[/color]
    <html>
    <head>
    <link href = "sample.css "
    rel = "stylesheet "
    type = "text/css"[color=blue]
    >[/color]
    </head>
    <frameset rows = "50%,*" cols = "50%,*">
    <frame name = "ul">
    <frame name = "ur">
    <frame name = "ll">
    <frame name = "lr">
    </frameset>
    </html>

    ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^

    and here is the style sheet (named sample.css):

    vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvvvvvvvvvvvvv vvvvvvvvvv

    FRAME
    {
    bordercolor : #ff0000
    frameborder : yes
    border : 50
    }
    FRAMESET
    {
    bordercolor : #00ff00
    frameborder : yes
    border : 25
    }

    ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^
  • Rob McAninch

    #2
    Re: Frames, Framesets and CSS

    x <news:406C9726. 9050803@dev.nul l>:
    [color=blue]
    > I am trying to get CSS to work with a framed web page, but I
    > cannot.
    >
    > Does anyone know the syntax required in a CSS specification
    > to specify attributes of the frames?[/color]

    W3C's overview of Web style sheets: CSS.

    The Web Design Group's guide to Cascading Style Sheets.


    --
    Rob - http://rock13.com/
    Web Stuff: http://rock13.com/webhelp/

    Comment

    • Neal

      #3
      Re: Frames, Framesets and CSS

      On Thu, 01 Apr 2004 22:26:12 GMT, x <x@dev.null> wrote:
      [color=blue]
      >
      >
      > Greetings everyone:
      >
      > I am trying to get CSS to work with a framed web page, but I cannot.
      >
      > Does anyone know the syntax required in a CSS specification
      > to specify attributes of the frames?[/color]

      The WC3 knows. All the valid CSS properties are listed at
      http://www.w3.org/TR/CSS2/propidx.html .

      [color=blue]
      > FRAME
      > {
      > bordercolor : #ff0000
      > frameborder : yes
      > border : 50
      > }
      > FRAMESET
      > {
      > bordercolor : #00ff00
      > frameborder : yes
      > border : 25
      > }[/color]


      See, you're just making shit up. It doesn't work that way.

      It's my understanding that CSS does not affect frameset documents. I base
      that solely on not recalling any instance of frameset ever being mentioned
      in the CSS specs, so I may be in error. I welcome correction.

      Comment

      • Jukka K. Korpela

        #4
        Re: Frames, Framesets and CSS

        Neal <neal413@spamrc n.com> wrote:
        [color=blue]
        > It's my understanding that CSS does not affect frameset documents. I
        > base that solely on not recalling any instance of frameset ever being
        > mentioned in the CSS specs, so I may be in error.[/color]

        The CSS specifications do not discuss framesets*), but this does not
        exclude them from the scope of applicability of CSS. And the sample style
        sheet for HTML 4 in the CSS 2 specification sets some properties for
        FRAMESET, FRAME, etc., too. (Nothing fancy, just things like
        display: block, but still.)
        *) In discussing positioning, CSS 2 spec mentions features that can be
        used "to create frame-like presentations", but this does not imply that
        framesets themselves could not be affected by CSS.

        There's not much one can do with CSS to a frameset.*) One might try
        settings widths and heights for the frames, but this is usually less
        convenient than just doing so in markup - and could cause browser
        confusion I'm afraid.
        *) One needs to remember that a style sheet affects the document only,
        not any document that it embeds, via the FRAME element or otherwise. So
        you cannot e.g. set the font size effectively, except for the NOFRAMES
        part, for the few advanced noframes-capable CSS-enabled browsers.

        Setting borders is a special problem. Since frameset rendering has not
        been described in CSS terms, even in the somewhat obscure sample style
        sheet for HTML 4, we don't really know how to affect it in CSS, except by
        trial and error, and knowing that whatever works on one browser may fail
        on another. For IE at least, it is possible to set the color and width of
        borders as follows:
        - use nonstandard HTML attributes to remove all frame borders
        (<frameset ... frameborder="0" border="0" framespacing="0 ">)
        - use standard CSS to suggest the borders you like for the frame
        elements.
        See http://www.cs.tut.fi/~jkorpela/tekoik/keh.html for a demo.
        It uses three frames and sets some colored borders:

        frame { border: solid #090 0; }
        #f1 { border-right-width: medium; }
        #f2 { border-bottom-width: medium; }

        Note: f1 and f2 have been defined as <frame id="f1" ...>. The id
        attribute values need not be descriptive, unlike the name attribute
        values for frame elements - remember that name values will be spoken to
        people using speech browsers, displayed to people using Lynx, etc.
        So they should be short but informative of content, and naturally in the
        language of the document. This is why it is convenient to use id
        attributes for referring to the frames in CSS, especially since in CSS
        selectors, it's best to use Ascii characters only.

        I don't particularly like the idea of colored frames borders. It makes me
        ask whether the scrollbars should be colored too, and then I'm on the way
        to hel^H^H^Hcreati ng a user interface for myself and not for users.
        Besides, that would be somewhat inconvenient, since apparently I would
        need to put the (currently IE specific) scrollbar property settings into
        body { ... } rules in a style sheet for each framed document, rather than
        (as I first expected) into a frame { ... } rule in a style sheet for the
        frameset document. And this would imply that I need to have separate
        versions of the documents for framing, something that I normally avoid.

        --
        Yucca, http://www.cs.tut.fi/~jkorpela/

        Comment

        • Neal

          #5
          Re: Frames, Framesets and CSS

          On Fri, 2 Apr 2004 06:12:51 +0000 (UTC), Jukka K. Korpela
          <jkorpela@cs.tu t.fi> wrote:[color=blue]
          > And the sample style
          > sheet for HTML 4 in the CSS 2 specification sets some properties for
          > FRAMESET, FRAME, etc., too.[/color]

          I've heard mention of the sample CSS, but have not encountered it
          documented. Where can I find this? Is it a local css file stored with the
          browser, or available at WC3? Or am I totally off?

          Comment

          • Johannes Koch

            #6
            Re: Frames, Framesets and CSS

            Neal wrote:[color=blue]
            > On Fri, 2 Apr 2004 06:12:51 +0000 (UTC), Jukka K. Korpela
            > <jkorpela@cs.tu t.fi> wrote:
            >[color=green]
            >> And the sample style
            >> sheet for HTML 4 in the CSS 2 specification sets some properties for[/color][/color]
            ^^^^^^^^^^^^^^^ ^^^^^^^^^^^[color=blue][color=green]
            >> FRAMESET, FRAME, etc., too.[/color]
            >
            >
            > I've heard mention of the sample CSS, but have not encountered it
            > documented. Where can I find this? Is it a local css file stored with
            > the browser, or available at WC3?[/color]

            As Jukka said, it is "in the CSS 2 specification".
            --
            Johannes Koch
            In te domine speravi; non confundar in aeternum.
            (Te Deum, 4th cent.)

            Comment

            • Steve Pugh

              #7
              Re: Frames, Framesets and CSS

              Neal <neal413@spamrc n.com> wrote:
              [color=blue]
              >On Fri, 2 Apr 2004 06:12:51 +0000 (UTC), Jukka K. Korpela
              ><jkorpela@cs.t ut.fi> wrote:[color=green]
              >> And the sample style
              >> sheet for HTML 4 in the CSS 2 specification sets some properties for
              >> FRAMESET, FRAME, etc., too.[/color]
              >
              >I've heard mention of the sample CSS, but have not encountered it
              >documented. Where can I find this? Is it a local css file stored with the
              >browser, or available at WC3? Or am I totally off?[/color]

              It's part of the CSS spec, for example:

              "Appendix A. A sample style sheet for HTML 4.0"

              If you have Mozilla installed find html.css and have a look. That's
              the default stylesheet used to render pages in that browser. Then look
              at quirks.css and weep.

              Steve

              --
              "My theories appal you, my heresies outrage you,
              I never answer letters and you don't like my tie." - The Doctor

              Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

              Comment

              • Neal

                #8
                Re: Frames, Framesets and CSS

                On Fri, 02 Apr 2004 15:56:08 +0200, Johannes Koch <koch@w3develop ment.de>
                wrote:
                [color=blue]
                > Neal wrote:[color=green]
                >> I've heard mention of the sample CSS, but have not encountered it
                >> documented. Where can I find this? Is it a local css file stored with
                >> the browser, or available at WC3?[/color]
                >
                > As Jukka said, it is "in the CSS 2 specification".[/color]

                Thanks for being mildly helpful.

                As I've been combing through the specs for months, and for the last half
                hour specifically, but unsuccessfully, looking for this, a URL to that
                specific information might be really helpful.

                Or, if it's not collected into one document, that information would save
                me a bit of time as well. The phrasing of my post was meant to reflect
                that possibility.

                Comment

                • Steve Pugh

                  #9
                  Re: Frames, Framesets and CSS

                  Neal <neal413@spamrc n.com> wrote:
                  [color=blue]
                  >On Fri, 02 Apr 2004 15:56:08 +0200, Johannes Koch <koch@w3develop ment.de>
                  >wrote:
                  >[color=green]
                  >> Neal wrote:[color=darkred]
                  >>> I've heard mention of the sample CSS, but have not encountered it
                  >>> documented. Where can I find this? Is it a local css file stored with
                  >>> the browser, or available at WC3?[/color]
                  >>
                  >> As Jukka said, it is "in the CSS 2 specification".[/color]
                  >
                  >Thanks for being mildly helpful.
                  >
                  >As I've been combing through the specs for months, and for the last half
                  >hour specifically, but unsuccessfully, looking for this,[/color]

                  Really? So you looked at the home page of the CSS 2 spec?

                  And you looked at the table of contents part way down the page (linked
                  to from every page of the spec)?

                  And you didn't see the item in the ToC that says
                  "Appendix A. A sample style sheet for HTML 4.0"
                  [color=blue]
                  >a URL to that specific information might be really helpful.[/color]



                  The changes between this version and the CSS 2.1 version I posted
                  earlier can be educational.

                  Steve

                  --
                  "My theories appal you, my heresies outrage you,
                  I never answer letters and you don't like my tie." - The Doctor

                  Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

                  Comment

                  • Neal

                    #10
                    Re: Frames, Framesets and CSS

                    On Fri, 02 Apr 2004 15:01:29 +0100, Steve Pugh <steve@pugh.net > wrote:
                    [color=blue]
                    > It's part of the CSS spec, for example:
                    > http://www.w3.org/TR/CSS21/sample.html
                    > "Appendix A. A sample style sheet for HTML 4.0"[/color]

                    Appreciated. I was looking through the CSS2, not the revision. It's
                    clearly available in the revision. Thanks.

                    Comment

                    • Neal

                      #11
                      Re: Frames, Framesets and CSS

                      On Fri, 02 Apr 2004 15:14:36 +0100, Steve Pugh <steve@pugh.net > wrote:

                      [color=blue]
                      > Really? So you looked at the home page of the CSS 2 spec?
                      > http://www.w3.org/TR/CSS2/
                      > And you looked at the table of contents part way down the page (linked
                      > to from every page of the spec)?
                      > http://www.w3.org/TR/CSS2/cover.html#minitoc
                      > And you didn't see the item in the ToC that says
                      > "Appendix A. A sample style sheet for HTML 4.0"[/color]

                      Believe it or not. My eyes must be going, there it is. Damn.

                      (In my defense, that's a hell of a long list and with such tight spacing
                      it all kind of runs together after a while...)
                      [color=blue]
                      > The changes between this version and the CSS 2.1 version I posted
                      > earlier can be educational.[/color]

                      Indeed.

                      Thanks again.

                      Comment

                      • Stephen Poley

                        #12
                        Re: Frames, Framesets and CSS

                        On Fri, 02 Apr 2004 09:18:17 -0500, Neal <neal413@spamrc n.com> wrote:
                        [color=blue]
                        >On Fri, 02 Apr 2004 15:14:36 +0100, Steve Pugh <steve@pugh.net > wrote:
                        >
                        >[color=green]
                        >> Really? So you looked at the home page of the CSS 2 spec?
                        >> http://www.w3.org/TR/CSS2/
                        >> And you looked at the table of contents part way down the page (linked
                        >> to from every page of the spec)?
                        >> http://www.w3.org/TR/CSS2/cover.html#minitoc
                        >> And you didn't see the item in the ToC that says
                        >> "Appendix A. A sample style sheet for HTML 4.0"[/color]
                        >
                        >Believe it or not. My eyes must be going, there it is. Damn.
                        >
                        >(In my defense, that's a hell of a long list and with such tight spacing
                        >it all kind of runs together after a while...)[/color]

                        Ctrl-F has its uses. (In Opera and IE anyway - doubtless all other
                        browsers have their equivalent.)

                        --
                        Stephen Poley


                        Comment

                        • Karl Smith

                          #13
                          Re: Frames, Framesets and CSS

                          Steve Pugh <steve@pugh.net > wrote:
                          [color=blue]
                          > If you have Mozilla installed find html.css and have a look. That's
                          > the default stylesheet used to render pages in that browser. Then look
                          > at quirks.css and weep.[/color]

                          Just to elaborate, quirks.css is *not* the stylesheet for QuirksMode
                          (that would be too obvious). QuirksMode is hard coded - quirks.css is
                          the stylesheet for "almost standards" mode. The next (7.5) version of
                          Opera will also feature 3 modes instead of two, and its equivalent
                          file is "browser.cs s".

                          --
                          Karl Smith.

                          Comment

                          • Steve Pugh

                            #14
                            Re: Frames, Framesets and CSS

                            google-2003-03@kjsmith.com (Karl Smith) wrote:
                            [color=blue]
                            >Steve Pugh <steve@pugh.net > wrote:
                            >[color=green]
                            >> If you have Mozilla installed find html.css and have a look. That's
                            >> the default stylesheet used to render pages in that browser. Then look
                            >> at quirks.css and weep.[/color]
                            >
                            >Just to elaborate, quirks.css is *not* the stylesheet for QuirksMode
                            >(that would be too obvious). QuirksMode is hard coded - quirks.css is
                            >the stylesheet for "almost standards" mode.[/color]

                            Are you sure? quirks.css contains some stuff (e.g. non-inheritence of
                            font sizes into tables) that's only done in Quirks mode not Almost
                            Standards mode.
                            [color=blue]
                            >The next (7.5) version of
                            >Opera will also feature 3 modes instead of two, and its equivalent
                            >file is "browser.cs s".[/color]

                            I've got 7.23 and 7.5p3 and I can't find a browser.css anywhere on my
                            system. Confused.

                            Steve

                            --
                            "My theories appal you, my heresies outrage you,
                            I never answer letters and you don't like my tie." - The Doctor

                            Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

                            Comment

                            • Karl Smith

                              #15
                              Re: Frames, Framesets and CSS

                              Steve Pugh <steve@pugh.net > wrote:
                              [color=blue]
                              > google-2003-03@kjsmith.com (Karl Smith) wrote:
                              >[color=green]
                              > >Steve Pugh <steve@pugh.net > wrote:
                              > >[color=darkred]
                              > >> If you have Mozilla installed find html.css and have a look. That's
                              > >> the default stylesheet used to render pages in that browser. Then look
                              > >> at quirks.css and weep.[/color]
                              > >
                              > >Just to elaborate, quirks.css is *not* the stylesheet for QuirksMode
                              > >(that would be too obvious). QuirksMode is hard coded - quirks.css is
                              > >the stylesheet for "almost standards" mode.[/color]
                              >
                              > Are you sure? quirks.css contains some stuff (e.g. non-inheritence of
                              > font sizes into tables) that's only done in Quirks mode not Almost
                              > Standards mode.[/color]

                              Whoops. It's the other way around, "almost standards" is hard-coded
                              and quirks.css contains additional quirks to get from there to full
                              "QuirksMode ".

                              I asked about this file years ago when I first discovered it, and
                              young Christopher Hoess told me it was part, but not all of
                              QuirksMode. I.e., I couldn't eliminate QuirksMode just by altering
                              quirks.css.

                              [color=blue][color=green]
                              > >The next (7.5) version of
                              > >Opera will also feature 3 modes instead of two, and its equivalent
                              > >file is "browser.cs s".[/color]
                              >
                              > I've got 7.23 and 7.5p3 and I can't find a browser.css anywhere on my
                              > system. Confused.[/color]

                              Yes I was confused, sorry. Apparently all three modes are hard-coded
                              in Opera.

                              If created by the user, browser.css acts the same as a user stylesheet
                              except not the same (cascades after the user stylesheet and before the
                              hard-coded "stylesheet " - same place in the cascade as Mozilla's
                              quirks.css). I didn't know it had to be user created, and being easily
                              confused, I misunderstood its function. I've found this explanation:



                              --
                              Karl Smith.

                              Comment

                              Working...