tabs using CSS

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

    #16
    Re: tabs using CSS

    can you pl. tell me how the "div soup" is invalid markup? I checked the
    code with the W3c validator & the only error I got was "<style> element
    was missing the type attribute". Other than that, the document was
    perfectly valid. I'll make sure I paste a link to the code next time
    around.
    Thx.
    Spartanicus wrote:[color=blue]
    > "listaction " <listaction@gma il.com> wrote:
    >[color=green]
    > >Pros and cons of doing something like this?[/color]
    >
    > [snip code]
    >
    > Don't post code to the group, upload it, post the url.
    >[color=green]
    > ><div class="class4"> </div>
    > ><div id="d1"class="c lass2 font1 fontbold" >test1</div>
    > ><div class="class4"> </div>
    > ><div id="d2" class="class3 font1" >test2</div>
    > ><div class="class1"> </div>[/color]
    >
    > Had you paid attention whilst looking at the existing proven solutions
    > you would have noticed that they were based on correct markup, unlike
    > the div soup you created.
    >
    > http://homepage.ntlworld.com/spartanicus/tabs.htm
    >
    > --
    > Spartanicus[/color]

    Comment

    • Spartanicus

      #17
      Re: tabs using CSS

      Please do not top post, corrected this once.

      "listaction " <listaction@gma il.com> wrote:
      [color=blue][color=green][color=darkred]
      >> ><div class="class4"> </div>
      >> ><div id="d1"class="c lass2 font1 fontbold" >test1</div>
      >> ><div class="class4"> </div>
      >> ><div id="d2" class="class3 font1" >test2</div>
      >> ><div class="class1"> </div>[/color]
      >>
      >> Had you paid attention whilst looking at the existing proven solutions
      >> you would have noticed that they were based on correct markup, unlike
      >> the div soup you created.[/color][/color]
      [color=blue]
      >can you pl. tell me how the "div soup" is invalid markup? I checked the
      >code with the W3c validator & the only error I got was "<style> element
      >was missing the type attribute". Other than that, the document was
      >perfectly valid.[/color]

      Valid != correct.

      Markup should describe the semantics and structure of a document. Div
      and span are non semantic elements and for most purposes non structural.
      They should only be used in addition to semantic or structural elements
      for the purpose of styling when no naturally occurring semantic or
      structural element is available to bind the styling to (*).

      (*) The only exception to this rule is using these elements for
      supplying language information.

      --
      Spartanicus

      Comment

      • listaction

        #18
        Re: tabs using CSS

        Gotcha. I replaced my "div soup" to include <li> and <ul> instead. thx
        for pointing it out.
        Spartanicus wrote:[color=blue]
        > Please do not top post, corrected this once.
        >
        > "listaction " <listaction@gma il.com> wrote:
        >[color=green][color=darkred]
        > >> ><div class="class4"> </div>
        > >> ><div id="d1"class="c lass2 font1 fontbold" >test1</div>
        > >> ><div class="class4"> </div>
        > >> ><div id="d2" class="class3 font1" >test2</div>
        > >> ><div class="class1"> </div>
        > >>
        > >> Had you paid attention whilst looking at the existing proven solutions
        > >> you would have noticed that they were based on correct markup, unlike
        > >> the div soup you created.[/color][/color]
        >[color=green]
        > >can you pl. tell me how the "div soup" is invalid markup? I checked the
        > >code with the W3c validator & the only error I got was "<style> element
        > >was missing the type attribute". Other than that, the document was
        > >perfectly valid.[/color]
        >
        > Valid != correct.
        >
        > Markup should describe the semantics and structure of a document. Div
        > and span are non semantic elements and for most purposes non structural.
        > They should only be used in addition to semantic or structural elements
        > for the purpose of styling when no naturally occurring semantic or
        > structural element is available to bind the styling to (*).
        >
        > (*) The only exception to this rule is using these elements for
        > supplying language information.
        >
        > --
        > Spartanicus[/color]

        Comment

        • Lauri Raittila

          #19
          Re: tabs using CSS

          in comp.infosystem s.www.authoring.stylesheets, VK wrote:
          [color=blue]
          > IE 5.x (?), IE 6.x for sure, FF 1.0.4 or higher, Opera 8.x for sure.
          >
          > If Safary 2.x or higher supports inline-block then I can live with it
          > in my particular solutions. But does it?[/color]

          Inline-block works somehow in all mentioned. This page is tested with
          Opera 8.5, 9; IE6; FF1; Safari 2.0.2


          Extra code is needed for IE and FF, but nothing but CSS2.1 is used, and
          fully CSS2.1 supporting browsers will show it as intended. I did not test
          with bare inline-block on safari, but afaik it supports it.

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

          Comment

          • Ian McCarthy

            #20
            Re: tabs using CSS

            Spartanicus wrote:[color=blue]
            > Valid != correct.
            >
            > Markup should describe the semantics and structure of a document. Div
            > and span are non semantic elements and for most purposes non structural.
            > They should only be used in addition to semantic or structural elements
            > for the purpose of styling when no naturally occurring semantic or
            > structural element is available to bind the styling to (*).
            >
            > (*) The only exception to this rule is using these elements for
            > supplying language information.
            >[/color]

            Could you please explain, to this novice, where the W3C give the sort of
            guidance, as you have stated above, or is it your interpretation of the
            standard? It would be useful to be able to have such explanations
            available when reading the W3C specs, which in the main say what not
            why, it being far easier to write a standard than explain why the rules
            of a standard exist, and the logic behind them.
            --
            Cheers Ian Mac

            Comment

            • Spartanicus

              #21
              Re: tabs using CSS

              Ian McCarthy <idm.plusnetng@ cronkshawFULLST OPnospanDOTcom> wrote:
              [color=blue][color=green]
              >> Valid != correct.
              >>
              >> Markup should describe the semantics and structure of a document. Div
              >> and span are non semantic elements and for most purposes non structural.
              >> They should only be used in addition to semantic or structural elements
              >> for the purpose of styling when no naturally occurring semantic or
              >> structural element is available to bind the styling to (*).
              >>
              >> (*) The only exception to this rule is using these elements for
              >> supplying language information.[/color]
              >
              >Could you please explain, to this novice, where the W3C give the sort of
              >guidance, as you have stated above, or is it your interpretation of the
              >standard?[/color]

              W3C create and publish recommendations that for all intended purposes
              function as standards. They don't typically publish guidelines or
              tutorials on good authoring practices. What I wrote cannot be found in
              W3C literature, nor is it an interpretation of the standard since W3C
              standards don't concern themselves with application beyond basic
              syntactical rules.
              [color=blue]
              >It would be useful to be able to have such explanations
              >available when reading the W3C specs, which in the main say what not
              >why,[/color]

              Good authoring practices can be learned in a systematic and
              comprehensive way with a good book or tutorial. For individual issues
              this comp.infosystem s.www.authoring.* usenet hierarchy should provide
              ample guidance.

              --
              Spartanicus

              Comment

              • tsreedevi
                New Member
                • Feb 2006
                • 2

                #22
                i want to highlight the tab in which i am there at present?

                i am trying to craete the css tabs

                css code


                .navigation a
                {
                color: #000;
                background: #fb0 url("../images/left-tab.gif") left top no-repeat;
                text-decoration: none;
                padding-left: 10px ;
                font-weight:bold;
                }

                .navigation a span
                {
                background: url("../images/right-tab.gif") right top no-repeat;
                padding-right: 10px
                }
                /*
                .navigation a:link, .navigation a:visited, .navigation a:active
                {color: #fff; background: #bbb uurl("../images/left-tab.gif") left top no-repeat; font-weight:bold; padding-left: 10px}
                .navigation a:link span, .navigation a:visited span, .navigation a:active span
                {background: #bbb ("../images/right-tab.gif") right top no-repeat; padding-right: 10px}
                */
                .navigation a, .navigation a span
                {
                display: block;
                float: left
                }

                .navigation a, .navigation a span
                {
                float: none
                }

                .navigation a:hover
                {
                color:#F5FFFA;
                background: #26a url("../images/left-tab-hover.gif") left top no-repeat;
                text-decoration: none;
                padding-left: 10px
                }

                .navigation a:hover span
                {
                background: url("../images/right-tab-hover.gif") right top no-repeat;
                padding-right: 10px
                }

                .navigation, .navigation ul
                {
                list-style: none;
                padding: 0;
                margin: 0
                }

                .navigation li
                {
                float: left;
                display: block;
                margin: 0;
                padding: 0
                }

                and in jsp file i am using as

                <h:panelGrid columns="2" styleClass="nav igation">
                <ul>
                <h:column>
                <li><h:commandL ink action="edit100 3">
                <span><h:output Text value="#{msgs.e dit1003}" styleClass="mai ntabtext"/></span>
                </h:commandLink>
                </li>
                </h:column>
                <h:column>

                <li> <h:commandLin k action="aboutus ">
                <span> <h:outputText value="#{msgs.a boutus}" styleClass="mai ntabtext"/></span>
                </h:commandLink>
                </li>
                </h:column>
                </ul>
                </h:panelGrid>


                some one please let me know how to highlight the current page do i need to use any javascript if so can some send me code snippet it would be greatful

                thansk in advance.
                sreedevi

                Comment

                Working...