spans all in a row

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

    spans all in a row

    Hi all
    I would like to see all the spans below inline one next to the other. I
    do not want to use absolute but relative or no positioning. This will
    eventually be a receipt that will be printed twice on the same page with a
    control for input that disappears (display:none) when the document is sent
    to the printer. That means that the document reflows and any absolutely
    positioned elements in the flow after the form control will need to be
    repositioned.
    The actual document can be viewed here. Be aware it is in Hebrew.


    A code example of the relevant problem is below. It doesn't display the way
    I would like as it is and in the page above I use absolute positioning and
    when the doc reflows I attempt to move them according to the new flow. Not a
    good idea!! It's what I have.
    any ideas?
    <BODY>
    <div>
    <span><img src="apic.gif" width=79 height=84 alt="a picture"
    border="0"></span>
    <span title="put me between the gifs">name<br>a ddress<br>telep hone</span>
    <span><img src="logo.gif" width=139 height=84 alt="company logo"
    border="0"></span>
    </div>
    Jimbo
    </BODY>


  • Jukka K. Korpela

    #2
    Re: spans all in a row

    "J. J. Cale" <photom@netvisi on.net.il> wrote:
    [color=blue]
    > I would like to see all the spans below inline one next to the
    > other. I
    > do not want to use absolute but relative or no positioning.[/color]

    You seem to think that you have a CSS problem. We discuss HTML in this
    group; CSS is next door (c.i.w.a.styles heets).
    [color=blue]
    > This will
    > eventually be a receipt that will be printed twice on the same page
    > with a control for input that disappears (display:none) when the
    > document is sent to the printer.[/color]

    This sounds odd. Are you sure that the very idea is feasible in authoring
    for the World Wide Web?
    [color=blue]
    > That means that the document reflows
    > and any absolutely positioned elements in the flow after the form
    > control will need to be repositioned.
    > The actual document can be viewed here. Be aware it is in Hebrew.
    > www.carmenchange.com/gbi[/color]

    It is best to specify the URL of a page, not just a string that might be
    error-corrected to a URL. The URL in this case is

    And it's _not_ Hebrew to me. The document's character encoding is not
    specified. Usually this means that most browsers default to iso-8859-1 or
    its Microsoftizatio n, windows-1252. However, today my IE decided that the
    encoding is Vietnamese encoding. I didn't check what this really means, but
    what I see is a mixture of Latin letters with different diacritics.
    So you have a problem there, whenever someone views the page on a browser
    that has not been built or configured to use a Hebrew encoding by default.
    [color=blue]
    > A code example of the relevant problem is below. It doesn't display the
    > way I would like as it is and in the page above I use absolute
    > positioning and
    > when the doc reflows I attempt to move them according to the new flow.[/color]

    Sorry, but it is very difficult, if not impossible, to see what you see as
    a problem here
    [color=blue]
    > <div>
    > <span><img src="apic.gif" width=79 height=84 alt="a picture"
    > border="0"></span>
    > <span title="put me between the
    > gifs">name<br>a ddress<br>telep hone</span> <span><img src="logo.gif"
    > width=139 height=84 alt="company logo" border="0"></span>
    > </div>
    > Jimbo[/color]

    As I wrote, the visual rendering part is a CSS matter. But I think the
    markup should be designed first. Use of <div> and <span> generally
    indicates wrong approach, except in cases where no adequate structural
    markup exists.

    As a quick sensibility test, view the page on a text-only browser.
    Does the following look reasonable?

    a picture name
    address
    telephone company logo
    Jimbo

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

    Comment

    • Els

      #3
      Re: spans all in a row

      J. J. Cale wrote:
      [color=blue]
      > Hi all[/color]

      Hello,
      [color=blue]
      > The actual document can be viewed here. Be aware it is in
      > Hebrew. www.carmenchange.com/gbi[/color]

      See Jukka's reply - I don't see Hebrew either :-)
      [color=blue]
      > A code example of the relevant problem is below. It doesn't
      > display the way I would like as it is and in the page above
      > I use absolute positioning and when the doc reflows I
      > attempt to move them according to the new flow. Not a good
      > idea!! It's what I have. any ideas?[/color]

      Yes, how about this:
      <body>
      <div class="address" >
      <p>
      name<br>
      address<br>
      telephone
      </p>
      </div>
      <body>

      And then in the stylesheet (as Jukka said, this actually
      belongs in a CSS group):

      div.address{
      background-image:url(logos m.gif);
      background-position:left top;
      background-repeat:no-repeat;
      }
      div.address p{
      background-image:url(logo2 sm.gif);
      background-position:right top;
      background-repeat:no-repeat;
      }


      --
      Els
      Blog and other pages, mostly outdated.

      Sonhos vem. Sonhos vão. O resto é imperfeito.
      - Renato Russo -

      Comment

      • Els

        #4
        Re: spans all in a row

        Els wrote:
        [color=blue]
        > <body>
        > <div class="address" >
        > <p>
        > name<br>
        > address<br>
        > telephone
        > </p>
        > </div>
        > <body>
        >
        > And then in the stylesheet (as Jukka said, this actually
        > belongs in a CSS group):
        >
        > div.address{
        > background-image:url(logos m.gif);
        > background-position:left top;
        > background-repeat:no-repeat;
        > }
        > div.address p{
        > background-image:url(logo2 sm.gif);
        > background-position:right top;
        > background-repeat:no-repeat;
        > }[/color]

        Oops, forgot: need to add text-align:center to the <p> styles.

        --
        Els
        Blog and other pages, mostly outdated.

        Sonhos vem. Sonhos vão. O resto é imperfeito.
        - Renato Russo -

        Comment

        • Jukka K. Korpela

          #5
          Re: spans all in a row

          Els <els.aNOSPAM@ti scali.nl> wrote:
          [color=blue]
          > <body>
          > <div class="address" >
          > <p>
          > name<br>
          > address<br>
          > telephone
          > </p>
          > </div>[/color]

          It's perhaps not quite logical to regard an address as a paragraph. Rather,
          a paragraph is a unit of text, typically consisting of a few sentences,
          expressing an idea or course of events. In good non-fiction prose,
          a paragraph typically starts with a key sentence that presents the basic
          idea, and subsequent sentences elaborate on that, present exceptions, etc.

          So I would omit the <p> markup. However, if you have several addresses in a
          sequence, you have the practical problem that in non-CSS presentation,
          there's no separation between the addresses, whereas <p> markup would imply
          some top and bottom margins for the elements in almost all visual
          rendering. In that case, it would be logical to use just <p> markup
          (<p class="address" >) instead of <div> markup, not in addition to it.

          As a different issue, it might be marginally better to separate the lines
          by using <div> markup for them instead of <br> markup between them. This
          would, in particular, make each line an element - hence styleable.
          This applies only when you don't use <p> markup (since <p> cannot contain
          <div>).

          Thus, my favorite markup for an address is

          <div class="address" >
          <div>name</div>
          <div>address</div>
          <div>telephon e</div>
          </div>
          [color=blue]
          > <body>[/color]

          And that's a typo, but luckily a markup error that a validator would
          report. :-)

          --
          Yucca, http://www.cs.tut.fi/~jkorpela/
          Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

          Comment

          • Els

            #6
            Re: spans all in a row

            Jukka K. Korpela wrote:
            [color=blue]
            > Els <els.aNOSPAM@ti scali.nl> wrote:
            >[color=green]
            >> <body>
            >> <div class="address" >
            >> <p>
            >> name<br>
            >> address<br>
            >> telephone
            >> </p>
            >> </div>[/color]
            >
            > It's perhaps not quite logical to regard an address as a
            > paragraph. Rather, a paragraph is a unit of text, typically
            > consisting of a few sentences, expressing an idea or course
            > of events. In good non-fiction prose, a paragraph typically
            > starts with a key sentence that presents the basic idea,
            > and subsequent sentences elaborate on that, present
            > exceptions, etc.[/color]

            My personal idea is that there should be an element called
            "address", but alas, there isn't. Sometimes I choose <p> for
            that, sometimes <div>. But you're right, in this particular
            case a <div> would be better than a <p>.
            [color=blue]
            > So I would omit the <p> markup. However, if you have
            > several addresses in a sequence, you have the practical
            > problem that in non-CSS presentation, there's no separation
            > between the addresses, whereas <p> markup would imply some
            > top and bottom margins for the elements in almost all
            > visual rendering. In that case, it would be logical to use
            > just <p> markup (<p class="address" >) instead of <div>
            > markup, not in addition to it.[/color]

            The reason I used both (I could also have used two divs
            though), is that I wouldn't know how to place two separate
            background images into one div. The trick I use for that is
            two divs nested, equal size, one with one background image,
            the other with the other background image.

            Must say though, that in this particular case, as it seems
            this div is going into a table cell, one of the background
            images could be assigned to the table cell itself, thus
            eliminating the need for the extra div.
            [color=blue]
            > As a different issue, it might be marginally better to
            > separate the lines by using <div> markup for them instead
            > of <br> markup between them. This would, in particular,
            > make each line an element - hence styleable. This applies
            > only when you don't use <p> markup (since <p> cannot
            > contain <div>).
            >
            > Thus, my favorite markup for an address is
            >
            > <div class="address" >
            > <div>name</div>
            > <div>address</div>
            > <div>telephon e</div>
            > </div>
            >[color=green]
            >> <body>[/color][/color]

            I almost agree with you. Just that /if/ there is no need for
            separate styling of the address lines, <br> is less code than
            <div></div>.
            [color=blue]
            > And that's a typo,[/color]

            Oops!
            [color=blue]
            > but luckily a markup error that a
            > validator would report. :-)[/color]

            True :-)

            --
            Els
            Blog and other pages, mostly outdated.

            Sonhos vem. Sonhos vão. O resto é imperfeito.
            - Renato Russo -

            Comment

            • Lauri Raittila

              #7
              Re: spans all in a row

              in comp.infosystem s.www.authoring.html, Els wrote:
              [color=blue]
              > My personal idea is that there should be an element called
              > "address", but alas, there isn't.[/color]

              Actually, there is.

              What you are after is elelement to mark addresses. But it would be hard
              to invent descriptive name for it, that would not confuse people even
              more
              [color=blue]
              > I almost agree with you. Just that /if/ there is no need for
              > separate styling of the address lines, <br> is less code than
              > <div></div>.[/color]

              How do you know that beforehand. I have had problems many times when
              writing userstylesheets for pages that use <br>. (though usually biggest
              problem is sites that use <br><br> as paragraph break)


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

              Comment

              • Els

                #8
                Re: spans all in a row

                Lauri Raittila wrote:
                [color=blue]
                > in comp.infosystem s.www.authoring.html, Els wrote:
                >[color=green]
                >> My personal idea is that there should be an element called
                >> "address", but alas, there isn't.[/color]
                >
                > Actually, there is.
                > http://www.w3.org/TR/REC-html40/stru...l.html#h-7.5.6[/color]

                Now that I see that, I do remember having read about it. I
                think that if I would use that element in a list of addresses
                I'd get 'complaints' about it not being appropriate, cause it
                'should' be used to supply contact information for a document.
                [color=blue]
                > What you are after is elelement to mark addresses. But it
                > would be hard to invent descriptive name for it, that would
                > not confuse people even more[/color]

                I don't have a real problem with <div> :-)
                [color=blue][color=green]
                >> I almost agree with you. Just that /if/ there is no need
                >> for separate styling of the address lines, <br> is less
                >> code than <div></div>.[/color]
                >
                > How do you know that beforehand.[/color]

                That depends on what kind of file it is.
                [color=blue]
                > I have had problems many
                > times when writing userstylesheets for pages that use <br>.
                > (though usually biggest problem is sites that use <br><br>
                > as paragraph break)[/color]

                Well, that's something different imo.
                I find it far more logical to want to be able to style
                paragraphs than to be able to style 3 lines in an address.
                FWIW: 3x <div>....</div> inside a <div class="address" > is
                only slightly easier to style than 3 lines with a <br> on the
                end inside that div. The real styling possibilities come in
                when each of those 3 <div>s have a different class, so that I
                could make the name bold and the phonenumber italic or
                something.

                At the same time, if I want to make my HTML so that I will
                never have to rewrite any of it if I want to apply whatever
                style I like, it would be good to pad all elements with divs
                and/or spans already.

                Example: sliding doors with background changes in IE. You
                /need/ <spans> inside the <a> elements for that. But do I add
                spans to all my <a> elements in <li>s ?
                No, I only do that if I have a plan to make those nice tabs as
                per the sliding doors model.

                --
                Els
                Blog and other pages, mostly outdated.

                Sonhos vem. Sonhos vão. O resto é imperfeito.
                - Renato Russo -

                Comment

                • Lauri Raittila

                  #9
                  Re: spans all in a row

                  in comp.infosystem s.www.authoring.html, Els wrote:[color=blue]
                  > Lauri Raittila wrote:
                  >[color=green]
                  > > in comp.infosystem s.www.authoring.html, Els wrote:
                  > >[color=darkred]
                  > >> My personal idea is that there should be an element called
                  > >> "address", but alas, there isn't.[/color]
                  > >
                  > > Actually, there is.
                  > > http://www.w3.org/TR/REC-html40/stru...l.html#h-7.5.6[/color]
                  >
                  > Now that I see that, I do remember having read about it. I
                  > think that if I would use that element in a list of addresses
                  > I'd get 'complaints' about it not being appropriate, cause it
                  > 'should' be used to supply contact information for a document.
                  >[color=green]
                  > > What you are after is elelement to mark addresses. But it
                  > > would be hard to invent descriptive name for it, that would
                  > > not confuse people even more[/color]
                  >
                  > I don't have a real problem with <div> :-)
                  >[color=green][color=darkred]
                  > >> I almost agree with you. Just that /if/ there is no need
                  > >> for separate styling of the address lines, <br> is less
                  > >> code than <div></div>.[/color]
                  > >
                  > > How do you know that beforehand.[/color]
                  >
                  > That depends on what kind of file it is.
                  >[color=green]
                  > > I have had problems many
                  > > times when writing userstylesheets for pages that use <br>.
                  > > (though usually biggest problem is sites that use <br><br>
                  > > as paragraph break)[/color]
                  >
                  > Well, that's something different imo.
                  > I find it far more logical to want to be able to style
                  > paragraphs than to be able to style 3 lines in an address.[/color]

                  Well, you don't have paragraph necessarily.
                  [color=blue]
                  > FWIW: 3x <div>....</div> inside a <div class="address" > is
                  > only slightly easier to style than 3 lines with a <br> on the
                  > end inside that div. The real styling possibilities come in
                  > when each of those 3 <div>s have a different class, so that I
                  > could make the name bold and the phonenumber italic or
                  > something.[/color]

                  Well, I can't make 2nd or 3rd line different than other 2, when br is
                  used. I can do that when divs are used.

                  Selectors:
                  ..address div:first-child + div {/* 2nd row*/}
                  ..address div + div + div {/* 3rd row*/}

                  For example, I might want to print only name and address, and that reason
                  hide telephone.
                  [color=blue]
                  > At the same time, if I want to make my HTML so that I will
                  > never have to rewrite any of it if I want to apply whatever
                  > style I like, it would be good to pad all elements with divs
                  > and/or spans already.[/color]

                  That is of course different.
                  [color=blue]
                  > Example: sliding doors with background changes in IE. You
                  > /need/ <spans> inside the <a> elements for that. But do I add
                  > spans to all my <a> elements in <li>s ?
                  > No, I only do that if I have a plan to make those nice tabs as
                  > per the sliding doors model.[/color]

                  I don't mean that you should use more elements, but choose elements.
                  After all, changing

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

                  Comment

                  • Els

                    #10
                    Re: spans all in a row

                    Lauri Raittila wrote:
                    [color=blue]
                    > in comp.infosystem s.www.authoring.html, Els wrote:[color=green]
                    >> Lauri Raittila wrote:
                    >>[color=darkred]
                    >> > in comp.infosystem s.www.authoring.html, Els wrote:
                    >> >
                    >> >> My personal idea is that there should be an element
                    >> >> called "address", but alas, there isn't.
                    >> >
                    >> > Actually, there is.
                    >> > http://www.w3.org/TR/REC-html40/stru...bal.html#h-7.5.
                    >> > 6[/color]
                    >>
                    >> Now that I see that, I do remember having read about it. I
                    >> think that if I would use that element in a list of
                    >> addresses I'd get 'complaints' about it not being
                    >> appropriate, cause it 'should' be used to supply contact
                    >> information for a document.
                    >>[color=darkred]
                    >> > What you are after is elelement to mark addresses. But
                    >> > it would be hard to invent descriptive name for it, that
                    >> > would not confuse people even more[/color]
                    >>
                    >> I don't have a real problem with <div> :-)
                    >>[color=darkred]
                    >> >> I almost agree with you. Just that /if/ there is no
                    >> >> need for separate styling of the address lines, <br> is
                    >> >> less code than <div></div>.
                    >> >
                    >> > How do you know that beforehand.[/color]
                    >>
                    >> That depends on what kind of file it is.
                    >>[color=darkred]
                    >> > I have had problems many
                    >> > times when writing userstylesheets for pages that use
                    >> > <br>. (though usually biggest problem is sites that use
                    >> > <br><br> as paragraph break)[/color]
                    >>
                    >> Well, that's something different imo.
                    >> I find it far more logical to want to be able to style
                    >> paragraphs than to be able to style 3 lines in an address.[/color]
                    >
                    > Well, you don't have paragraph necessarily.
                    >[color=green]
                    >> FWIW: 3x <div>....</div> inside a <div class="address" > is
                    >> only slightly easier to style than 3 lines with a <br> on
                    >> the end inside that div. The real styling possibilities
                    >> come in when each of those 3 <div>s have a different
                    >> class, so that I could make the name bold and the
                    >> phonenumber italic or something.[/color]
                    >
                    > Well, I can't make 2nd or 3rd line different than other 2,
                    > when br is used. I can do that when divs are used.
                    >
                    > Selectors:
                    > .address div:first-child + div {/* 2nd row*/}
                    > .address div + div + div {/* 3rd row*/}[/color]

                    And how many browsers support that?
                    I want my styles to be visible in "all" browsers. (excluding
                    NN4 and the like of course)
                    [color=blue]
                    > For example, I might want to print only name and address,
                    > and that reason hide telephone.
                    >[color=green]
                    >> At the same time, if I want to make my HTML so that I will
                    >> never have to rewrite any of it if I want to apply
                    >> whatever style I like, it would be good to pad all
                    >> elements with divs and/or spans already.[/color]
                    >
                    > That is of course different.[/color]

                    In a way it is, but it still boils down to: how do you know
                    what styles you want to use later on. You don't, but you can
                    guess.
                    [color=blue][color=green]
                    >> Example: sliding doors with background changes in IE. You
                    >> /need/ <spans> inside the <a> elements for that. But do I
                    >> add spans to all my <a> elements in <li>s ?
                    >> No, I only do that if I have a plan to make those nice
                    >> tabs as per the sliding doors model.[/color]
                    >
                    > I don't mean that you should use more elements, but choose
                    > elements.[/color]

                    Yes, I know that. Just saying that 3x <div></div> is only
                    slightly better than 3x <br> in the case of an address.
                    [color=blue]
                    > After all, changing[/color]

                    I strongly suspect you hit the Send button a bit too early...
                    ;-)

                    --
                    Els
                    Blog and other pages, mostly outdated.

                    Sonhos vem. Sonhos vão. O resto é imperfeito.
                    - Renato Russo -

                    Comment

                    • Lauri Raittila

                      #11
                      Re: spans all in a row

                      in comp.infosystem s.www.authoring.html, Els wrote:[color=blue]
                      > Lauri Raittila wrote:
                      >[color=green]
                      > > in comp.infosystem s.www.authoring.html, Els wrote:[color=darkred]
                      > >> Lauri Raittila wrote:
                      > >>
                      > >> > I have had problems many
                      > >> > times when writing userstylesheets for pages that use
                      > >> > <br>.[/color][/color][/color]
                      [color=blue][color=green]
                      > > Well, I can't make 2nd or 3rd line different than other 2,
                      > > when br is used. I can do that when divs are used.
                      > >
                      > > Selectors:
                      > > .address div:first-child + div {/* 2nd row*/}
                      > > .address div + div + div {/* 3rd row*/}[/color]
                      >
                      > And how many browsers support that?[/color]

                      1-2 for first (presto + gecko?)
                      1-3 for second (Opera6 + presto + gecko?)

                      You missed my point about *user* stylesheets.
                      [color=blue][color=green]
                      > > That is of course different.[/color]
                      >
                      > In a way it is, but it still boils down to: how do you know
                      > what styles you want to use later on. You don't, but you can
                      > guess.[/color]

                      Yes. But as br is unstyleable many ways, it is nicer to use div, when
                      content is semantically different stuff (like in this example. It would
                      make difference, if line-break can't have any other semantical meaning
                      than line-break.)

                      I agree that number of people that actually use userstylesheets the way I
                      do is probably not big, especially when comparing to those who don't.
                      (One of million might be good guess...)
                      [color=blue][color=green]
                      > > After all, changing[/color]
                      >
                      > I strongly suspect you hit the Send button a bit too early...[/color]

                      Should be: adding additional elements is usually easy.

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

                      Comment

                      • Els

                        #12
                        Re: spans all in a row

                        Lauri Raittila wrote:
                        [color=blue]
                        > in comp.infosystem s.www.authoring.html, Els wrote:[color=green]
                        >> Lauri Raittila wrote:
                        >>[color=darkred]
                        >> > in comp.infosystem s.www.authoring.html, Els wrote:
                        >> >> Lauri Raittila wrote:
                        >> >>
                        >> >> > I have had problems many
                        >> >> > times when writing userstylesheets for pages that use
                        >> >> > <br>.[/color][/color]
                        >[color=green][color=darkred]
                        >> > Well, I can't make 2nd or 3rd line different than other
                        >> > 2, when br is used. I can do that when divs are used.
                        >> >
                        >> > Selectors:
                        >> > .address div:first-child + div {/* 2nd row*/}
                        >> > .address div + div + div {/* 3rd row*/}[/color]
                        >>
                        >> And how many browsers support that?[/color]
                        >
                        > 1-2 for first (presto + gecko?)
                        > 1-3 for second (Opera6 + presto + gecko?)[/color]

                        Which means it is of no use for me, as I design for the www,
                        not only for the clever surfers ;-)
                        [color=blue]
                        > You missed my point about *user* stylesheets.[/color]

                        True, missed the 'user' in the word.
                        But then again: I don't write for other people to use
                        userstylesheets either. If they want to use those, that's
                        their prerogative, but I'm not accommodating it.
                        [color=blue][color=green][color=darkred]
                        >> > That is of course different.[/color]
                        >>
                        >> In a way it is, but it still boils down to: how do you
                        >> know what styles you want to use later on. You don't, but
                        >> you can guess.[/color]
                        >
                        > Yes. But as br is unstyleable many ways, it is nicer to use
                        > div, when content is semantically different stuff (like in
                        > this example. It would make difference, if line-break can't
                        > have any other semantical meaning than line-break.)
                        >
                        > I agree that number of people that actually use
                        > userstylesheets the way I do is probably not big,
                        > especially when comparing to those who don't. (One of
                        > million might be good guess...)[/color]

                        Still: why would you want to style any of the 3 divs inside
                        the address different from another?
                        I can imagine you want the lines further away from each other,
                        or with more padding on the sides, but I think you'd just set
                        line-height to whatever you like and add padding to the
                        container div.
                        I doubt you're visiting a site, notice the 3 line address, and
                        think: lets give the first one a blue font, the second one a
                        yellow background and blow up the third one to 200% font-size.

                        What would you (I mean you, not the general userstylesheet
                        user) use your userstylesheet for if the address were written
                        in 3 divs?
                        [color=blue][color=green][color=darkred]
                        >> > After all, changing[/color]
                        >>
                        >> I strongly suspect you hit the Send button a bit too
                        >> early...[/color]
                        >
                        > Should be: adding additional elements is usually easy.[/color]

                        I don't really find it any easier than replacing elements
                        usually :-)

                        --
                        Els
                        Blog and other pages, mostly outdated.

                        Sonhos vem. Sonhos vão. O resto é imperfeito.
                        - Renato Russo -

                        Comment

                        • J. J. Cale

                          #13
                          Re: spans all in a row


                          "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote in message
                          news:Xns95F9701 D6E4F9jkorpelac stutfi@193.229. 0.31...[color=blue]
                          > "J. J. Cale" <photom@netvisi on.net.il> wrote:
                          >[color=green]
                          > > I would like to see all the spans below inline one next to the
                          > > other. I
                          > > do not want to use absolute but relative or no positioning.[/color]
                          >
                          > You seem to think that you have a CSS problem. We discuss HTML in this
                          > group; CSS is next door (c.i.w.a.styles heets).[/color]

                          Yukka thanks for your reply. Actually I was hoping this could be done with
                          plain HTML without the need for CSS positioning. Maybe I'll try using a list
                          in the middle span. I will repost this in the css group.


                          ppears (display:none) when the[color=blue][color=green]
                          > > document is sent to the printer.[/color]
                          >
                          > This sounds odd. Are you sure that the very idea is feasible in authoring
                          > for the World Wide Web?[/color]

                          The example page does what I want but I doubt if it will look the same in
                          other browsers.
                          [color=blue][color=green]
                          > > That means that the document reflows
                          > > and any absolutely positioned elements in the flow after the form
                          > > control will need to be repositioned.
                          > > The actual document can be viewed here. Be aware it is in Hebrew.
                          > > www.carmenchange.com/gbi[/color]
                          >
                          > It is best to specify the URL of a page, not just a string that might be
                          > error-corrected to a URL. The URL in this case is
                          > http://www.carmenchange.com/gbi/
                          > And it's _not_ Hebrew to me. The document's character encoding is not
                          > specified. Usually this means that most browsers default to iso-8859-1 or
                          > its Microsoftizatio n, windows-1252. However, today my IE decided that the
                          > encoding is Vietnamese encoding. I didn't check what this really means,[/color]
                          but[color=blue]
                          > what I see is a mixture of Latin letters with different diacritics.
                          > So you have a problem there, whenever someone views the page on a browser
                          > that has not been built or configured to use a Hebrew encoding by default.[/color]

                          I try not to use META tags but would appreciate advice on the correct
                          approach. My client has his fonts set in his browser. IE6. This tests ok in
                          Mozilla 7.1 although it doesn't set the char - encoding automatically. How
                          can I do this? Is it html?
                          [color=blue]
                          >[color=green]
                          > > A code example of the relevant problem is below. It doesn't display the
                          > > way I would like as it is and in the page above I use absolute
                          > > positioning and
                          > > when the doc reflows I attempt to move them according to the new flow.[/color]
                          >
                          > Sorry, but it is very difficult, if not impossible, to see what you see as
                          > a problem here[/color]

                          In the example below the spans do not display all in a line. The <br>'s
                          cause the text to jump around and the second gif is displayed below and to
                          the right of the first.[color=blue]
                          >[color=green]
                          > > <div>
                          > > <span><img src="apic.gif" width=79 height=84 alt="a picture"
                          > > border="0"></span>
                          > > <span title="put me between the
                          > > gifs">name<br>a ddress<br>telep hone</span> <span><img src="logo.gif"
                          > > width=139 height=84 alt="company logo" border="0"></span>
                          > > </div>
                          > > Jimbo[/color]
                          >
                          > As I wrote, the visual rendering part is a CSS matter. But I think the
                          > markup should be designed first. Use of <div> and <span> generally
                          > indicates wrong approach, except in cases where no adequate structural
                          > markup exists.[/color]

                          Thanks again for your advice. I have learned over the years to follow it.
                          Jimbo[color=blue]
                          > As a quick sensibility test, view the page on a text-only browser.
                          > Does the following look reasonable?
                          >
                          > a picture name
                          > address
                          > telephone company logo
                          > Jimbo
                          >
                          > --
                          > Yucca, http://www.cs.tut.fi/~jkorpela/
                          > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
                          >[/color]


                          Comment

                          • Lauri Raittila

                            #14
                            Re: spans all in a row

                            in comp.infosystem s.www.authoring.html, Els wrote:[color=blue]
                            > Lauri Raittila wrote:[/color]
                            [color=blue][color=green][color=darkred]
                            > >> > That is of course different.
                            > >>
                            > >> In a way it is, but it still boils down to: how do you
                            > >> know what styles you want to use later on. You don't, but
                            > >> you can guess.[/color]
                            > >
                            > > Yes. But as br is unstyleable many ways, it is nicer to use
                            > > div, when content is semantically different stuff (like in
                            > > this example. It would make difference, if line-break can't
                            > > have any other semantical meaning than line-break.)
                            > >
                            > > I agree that number of people that actually use
                            > > userstylesheets the way I do is probably not big,
                            > > especially when comparing to those who don't. (One of
                            > > million might be good guess...)[/color]
                            >
                            > Still: why would you want to style any of the 3 divs inside
                            > the address different from another?[/color]

                            Well, to remove one line, to get just name and phone number, or just get
                            name and address, as I think I already wrote. If speaking this example,
                            where components were name, address and phone number.

                            Or maybe floating 2nd to left and 3rd to left to better use of horizontal
                            space?
                            [color=blue]
                            > I doubt you're visiting a site, notice the 3 line address, and
                            > think: lets give the first one a blue font, the second one a
                            > yellow background and blow up the third one to 200% font-size.[/color]

                            No, I hardly ever change colors (exept to black and off-white), nor
                            change font etc. Most common thing in my site specific userstyles is
                            display:none;
                            [color=blue]
                            > What would you (I mean you, not the general userstylesheet
                            > user) use your userstylesheet for if the address were written
                            > in 3 divs?[/color]

                            Depends what I am looking, and in what environment the code was used. In
                            my general userstylesheet, I most likely had nothing, but I often make
                            stylesheets for one time use...
                            [color=blue][color=green]
                            > > Should be: adding additional elements is usually easy.[/color]
                            >
                            > I don't really find it any easier than replacing elements
                            > usually :-)[/color]

                            Well, if you replace element with different, you need also change the
                            stylesheet, if you have styled the elements.

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

                            Comment

                            • Darin McGrew

                              #15
                              Re: spans all in a row

                              J. J. Cale <nowayjimbo@now ay012.net.il.> wrote:[color=blue]
                              > Maybe I'll try using a list in the middle span.[/color]

                              SPAN elements cannot contain block-level elements like lists.


                              "Jukka K. Korpela" <jkorpela@cs.tu t.fi> wrote:[color=blue][color=green]
                              >> http://www.carmenchange.com/gbi/
                              >> And it's _not_ Hebrew to me. The document's character encoding is not
                              >> specified. Usually this means that most browsers default to iso-8859-1 or
                              >> its Microsoftizatio n, windows-1252. However, today my IE decided that the
                              >> encoding is Vietnamese encoding. I didn't check what this really means, but
                              >> what I see is a mixture of Latin letters with different diacritics.
                              >> So you have a problem there, whenever someone views the page on a browser
                              >> that has not been built or configured to use a Hebrew encoding by default.[/color][/color]

                              J. J. Cale <nowayjimbo@now ay012.net.il.> wrote:[color=blue]
                              > I try not to use META tags but would appreciate advice on the correct
                              > approach. My client has his fonts set in his browser. IE6. This tests ok in
                              > Mozilla 7.1 although it doesn't set the char - encoding automatically. How
                              > can I do this? Is it html?[/color]

                              No, it's the charset parameter of the Content-type HTTP header.

                              See http://ppewww.ph.gla.ac.uk/~flavell/.../internat.html
                              --
                              Darin McGrew, mcgrew@stanford alumni.org, http://www.rahul.net/mcgrew/
                              Web Design Group, darin@htmlhelp. com, http://www.HTMLHelp.com/

                              "You can't strengthen the weak by weakening the strong."

                              Comment

                              Working...