Loading ...
Sorry, an error occurred while loading the content.
 

Re: [NH] Crediting a Photograph

Expand Messages
  • Axel Berger
    ... A ? But why avoid it it? You want to display a group of related information in tabular form, that s exactly what tables are for. You are not abusing
    Message 1 of 18 , Mar 26, 2007
      Greg Chapman wrote:
      > What's the simplest way to achieve the same result
      > avoiding the use of <table>?

      A <DIV>? But why avoid it it? You want to display a group of related
      information in tabular form, that's exactly what tables are for. You are
      not abusing them for page layout here.
      Or do you use the newest XHTML that has abolished tables (again why?).
      In that case CSS display: contains all the features you need, i.e.
      table, row, cell etc. so you can cook your own with DIV and CLASS.
      But that solution will be NOT ACCESSIBLE to users and browsers without
      CSS support. I think accessibility and graceful degradation are the most
      important rules in any web design.

      Axel
    • Greg Chapman
      Hi Axel,On 26 Mar 07 13:21 Axel Berger said: Greg Chapman wrote: What s the simplest way to achieve the same result avoiding
      Message 2 of 18 , Mar 26, 2007
        Hi Axel,

        On 26 Mar 07 13:21 Axel Berger <Axel-Berger@...> said:
        > Greg Chapman wrote:
        > > What's the simplest way to achieve the same result
        > > avoiding the use of <table>?
        >
        > A <DIV>?

        I knew that would be the standard answer, but <DIV align="center"> is
        not valid, and I was trying to think of the appropriate way to define
        the margins.

        > But why avoid it it? You want to display a group of related
        > information in tabular form, that's exactly what tables are for. You
        > are not abusing them for page layout here.

        I suppose that, in this example, the image and the accompanying text
        is related and perhaps it is legitimate to claim this is not table
        abuse.

        So, disregard the particular example for a moment and just answer, how
        one would use a <DIV> to align to a fixed width object that remains
        centered within the window.

        Greg


        ___________________________________________________________
        Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
      • Axel Berger
        ... You can use text-align with IMG inside the DIV. To get what you want you may need to set the width of the text underneath the image or the DIV as a whole
        Message 3 of 18 , Mar 26, 2007
          Greg Chapman wrote:
          > So, disregard the particular example for a moment and just
          > answer, how one would use a <DIV> to align to a fixed width
          > object that remains centered within the window.

          You can use text-align with IMG inside the DIV. To get what you want you
          may need to set the width of the text underneath the image or the DIV as
          a whole manually, tables do it for you.
          Alternatively centering DIVs is meant to be done by setting both
          margin-left and margin-right to auto. As browser support varies you
          ought to use all three, i.e. both margins plus text-align:center. A
          downside is that this also centres text inside the DIV, so you may need
          to use an extra inner content DIV and set its text-align to something
          else.

          N.B: My source here is "integrated HTML and CSS" by Virginia deBolt -
          recommended

          Axel
        • Marcelo de Castro Bastos
          On the last exciting episode, aired on 26/3/2007 09:38, Greg Chapman ... One way is to define the width of the on the style, with width:300px or
          Message 4 of 18 , Mar 26, 2007
            On the last exciting episode, aired on 26/3/2007 09:38, Greg Chapman
            invited the wrath of the gods by saying:
            > Hi Axel,
            >
            > On 26 Mar 07 13:21 Axel Berger <Axel-Berger@...> said:
            >
            >> Greg Chapman wrote:
            >>
            >>> What's the simplest way to achieve the same result
            >>> avoiding the use of <table>?
            >>>
            >> A <DIV>?
            >>
            >
            > I knew that would be the standard answer, but <DIV align="center"> is
            > not valid, and I was trying to think of the appropriate way to define
            > the margins.
            >
            >
            >> But why avoid it it? You want to display a group of related
            >> information in tabular form, that's exactly what tables are for. You
            >> are not abusing them for page layout here.
            >>
            >
            > I suppose that, in this example, the image and the accompanying text
            > is related and perhaps it is legitimate to claim this is not table
            > abuse.
            >
            > So, disregard the particular example for a moment and just answer, how
            > one would use a <DIV> to align to a fixed width object that remains
            > centered within the window.
            >
            >
            One way is to define the width of the <DIV> on the style, with
            "width:300px" or similar.

            If you are NOT floating the image, you can even do the whole thing with
            a paragraph:

            <p style="text-align:right;width:300px;"><img src="imagename.jpg"
            height="200" width="300" alt="Image description"><br />Image caption</p>

            Or you can mix and match, doing the text formatting in the <p> and the
            floating on the <div> level.


            About Axel's message: I'm unaware that either XHTML 1.1 or XHTML 2.0
            (which is still a draft, anyway) has "abolished" tables. In fact, the
            current draft has this entry:
            http://www.w3.org/TR/xhtml2/mod-tables.html#edef_tables_table

            Marcelo

            -=-=-
            Generic Brown Label Tagline
            * TagZilla 0.066 on Seamonkey 1.1
          • Axel Berger
            ... Yes, you re right, please excuse these aging brain-cells. It is pure XML that as such does not contain any table element. For that the CSS display: can
            Message 5 of 18 , Mar 26, 2007
              Marcelo de Castro Bastos wrote:
              > I'm unaware that either XHTML 1.1 or XHTML 2.0 (which is still
              > a draft, anyway) has "abolished" tables. In fact, the
              > current draft has this entry:

              Yes, you're right, please excuse these aging brain-cells. It is pure XML
              that as such does not contain any table element. For that the CSS
              display: can take the values
              table
              inline-table
              table-row
              table-cell
              table-row-group (acts like TBODY)
              table-header-group
              table-footer-group
              table-column
              table-column-group
              table-caption
              so you can cook your own tables in pure XML. So this is not really an
              issue for us here or on the web.

              Axel
            • Greg Chapman
              Hi Marcelo,On 26 Mar 07 14:01 Marcelo de Castro Bastos said: One way is to define the width of the on the style, with
              Message 6 of 18 , Mar 26, 2007
                Hi Marcelo,

                On 26 Mar 07 14:01 Marcelo de Castro Bastos <mcblista@...>
                said:
                > One way is to define the width of the <DIV> on the style, with
                > "width:300px" or similar.
                >
                > If you are NOT floating the image, you can even do the whole thing
                > with a paragraph:
                >
                > <p style="text-align:right;width:300px;"><img src="imagename.jpg"
                > height="200" width="300" alt="Image description"><br />Image
                > caption</p>

                I was trying to centre the image within the window. Your code doesn't
                appear to do that and I haven't discovered the technique, with DIV or
                FLOAT to do that. (If I put an align="center" attribute to the P tag,
                it gets ignored because of the styling.)

                Greg


                ___________________________________________________________
                Try the all-new Yahoo! Mail. "The New Version is radically easier to use" � The Wall Street Journal
                http://uk.docs.yahoo.com/nowyoucan.html
              • Greg Chapman
                Hi Axel,On 26 Mar 07 14:01 Axel Berger said: You can use text-align with IMG inside the DIV. To get what you want you may need to
                Message 7 of 18 , Mar 26, 2007
                  Hi Axel,

                  On 26 Mar 07 14:01 Axel Berger <Axel-Berger@...> said:
                  > You can use text-align with IMG inside the DIV. To get what you want
                  > you may need to set the width of the text underneath the image or
                  > the DIV as a whole manually, tables do it for you.
                  > Alternatively centering DIVs is meant to be done by setting both
                  > margin-left and margin-right to auto. As browser support varies you
                  > ought to use all three, i.e. both margins plus text-align:center. A
                  > downside is that this also centres text inside the DIV, so you may
                  > need to use an extra inner content DIV and set its text-align to
                  > something else.
                  >
                  > N.B: My source here is "integrated HTML and CSS" by Virginia deBolt
                  > -
                  > recommended

                  Mmmm! I can see why you said forget the idea and keep using tables.
                  I was hoping for briefer code, but this all suggests that using tables
                  keeps the code as compact as any other approach.

                  Greg


                  ___________________________________________________________
                  To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
                • loro
                  ... Add margin-right: auto; margin-left: auto for the div (that already has a width). Lotta
                  Message 8 of 18 , Mar 26, 2007
                    Greg Chapman wrote:
                    >I was trying to centre the image within the window. Your code doesn't
                    >appear to do that and I haven't discovered the technique, with DIV or
                    >FLOAT to do that. (If I put an align="center" attribute to the P tag,
                    >it gets ignored because of the styling.)

                    Add 'margin-right: auto; margin-left: auto' for the div (that already has a
                    width).
                    <http://css-discuss.incutio.com/?page=CenteringBlockElement>

                    Lotta
                  • Greg Chapman
                    Hi Lotta,On 26 Mar 07 15:15 loro said: Add margin-right: auto; margin-left: auto for the div (that already has a width).
                    Message 9 of 18 , Mar 26, 2007
                      Hi Lotta,

                      On 26 Mar 07 15:15 loro <loro-spam01-@...> said:
                      > Add 'margin-right: auto; margin-left: auto' for the div (that
                      > already has a width).
                      > <http://css-discuss.incutio.com/?page=CenteringBlockElement>

                      Mmm! My page works in Firefox but not IE7. I see from the link on
                      that page that it's all to do with that dreaded "quirks mode"
                      behaviour. My test page has a tidy.exe inserted DOCTYPE of:

                      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

                      I think I'll give up and go back to good old tables!

                      At least I understand them! :-)

                      Greg


                      ___________________________________________________________
                      All New Yahoo! Mail � Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html
                    • Axel Berger
                      ... Yes, that is the correct way. Unfortunately it seems not to be reliably supportet by many browsers. I found that myself on my page with a BODY max-width.
                      Message 10 of 18 , Mar 26, 2007
                        loro wrote:
                        > Add 'margin-right: auto; margin-left: auto' for the div
                        > (that already has a width).
                        > <http://css-discuss.incutio.com/?page=CenteringBlockElement>

                        Yes, that is the correct way. Unfortunately it seems not to be reliably
                        supportet by many browsers. I found that myself on my page with a BODY
                        max-width. It didn't centre but invariably floated to the left. So I now
                        deliberately let it float to the right which gives a nicer appearance
                        than left imho.

                        Axel
                      • loro
                        ... Not many. Old. The only one of significance is IE version 5.x and older. IE6 needs to be in Standards Mode IIRC. The workaround for old IE is simple
                        Message 11 of 18 , Mar 26, 2007
                          Axel Berger wrote:
                          >loro wrote:
                          > > Add 'margin-right: auto; margin-left: auto' for the div
                          > > (that already has a width).
                          > > <http://css-discuss.incutio.com/?page=CenteringBlockElement>
                          >
                          >Yes, that is the correct way. Unfortunately it seems not to be reliably
                          >supportet by many browsers.

                          Not many. Old. The only one of significance is IE version 5.x and older.
                          IE6 needs to be in Standards Mode IIRC. The workaround for old IE is simple
                          enough. Use 'text-align: center on a containing element.

                          body { text-align: center }
                          #box { text-align: left;
                          width: 500px; height: 100px;
                          color: black; background: red;
                          margin: auto }


                          <div id="box></div>

                          Lotta
                        • Axel Berger
                          ... Don t know, I had that problem with the newest Firefox 1.5. Maybe it was because I did not use width but just a max-width and wanted centering when that
                          Message 12 of 18 , Mar 26, 2007
                            loro wrote:
                            > Not many. Old.

                            Don't know, I had that problem with the newest Firefox 1.5. Maybe it was
                            because I did not use width but just a max-width and wanted centering
                            when that was exceeded, but it didn't happen.

                            OTOH I think it is the old ones we ought to support. If we conform to
                            standards (that of course is a must, always) and early adopters install
                            new junk that does not, tough.
                            But if someone uses software she's content with and we use new gimmiks
                            without any real need for them that break it and force her to upgrade,
                            then that's the height of arrogance on our side. Even well known old
                            bugs should be taken into account if possible within reasonable effort.
                            Sure there may be reasons. Playing MP3s just can't be done on an IBM XT,
                            so no upgrade no music and that can't be helped.

                            But I just encountered the opposide. My old phone switchboard used a few
                            menues to enter data and wrote them into the switchboard through a
                            serial connection. All that under DOS and on my XT compatible DOS 5.0
                            handheld. My new switchboard uses a few menues to enter data and writes
                            them into the switchboard through a serial connection. But the software,
                            if anything less useable than the old but with more colours, runs in
                            interpreted Java and my notebook with 780 times the computing power of
                            an XT can't keep up with the serial timing. Those nutters expect me to
                            get a new computer just to stand out in the landing and log some calls.

                            We web designers are often the same. We do not normally offer anything
                            that an old browser wasn't designed to cope with, we only do it in a
                            more garish way.

                            (And yes, I may well be a purist leaning towards the puritan.)

                            Axel
                          • loro
                            ... It works with max-width. But the box is always expanded to the max-width. ... If you mean really old ones like Netscape 4 and the like, don t you think
                            Message 13 of 18 , Mar 26, 2007
                              Axel Berger wrote:
                              >Don't know, I had that problem with the newest Firefox 1.5. Maybe it was
                              >because I did not use width but just a max-width and wanted centering
                              >when that was exceeded, but it didn't happen.

                              It works with max-width. But the box is always expanded to the max-width.

                              >OTOH I think it is the old ones we ought to support.

                              If you mean really old ones like Netscape 4 and the like, don't you think
                              they are best supported by giving them unstyled pages? If you want
                              everything to *look* exactly the same in every existing browser, then it's
                              questionable if there is any point at all in using CSS.

                              Lotta
                            • Axel Berger
                              ... Yes, of course I do. They need not look the same, but they have to be legible and useable. All too many new pages are a totally incoherent jumble with CSS
                              Message 14 of 18 , Mar 27, 2007
                                loro wrote:
                                > don't you think they are best supported by giving them unstyled pages?

                                Yes, of course I do. They need not look the same, but they have to be
                                legible and useable. All too many new pages are a totally incoherent
                                jumble with CSS turned off. And if some things just can't be done, then
                                leave notes (display:hidden) "With style sheets you would ..." and "With
                                Javascript on you could ..."
                                The same for IE. If max-width and min-width don't work I need not go to
                                enormous lengths to mock them up. But if the results without them become
                                unacceptable I should think about an alternative. Perhaps, depending on
                                content, a fixed width is the lesser evil.

                                > It works with max-width. But the box is always expanded to the max-width.

                                Don't know what I did wrong there, but for me it did not centre. The
                                max-width as such worked fine.

                                Axel
                              • Axel Berger
                                ... I still do not, but now it works all of a sudden, so the mistake must have been mine. This is from my current central stylesheet: HTML { margin-left:1em;
                                Message 15 of 18 , Mar 27, 2007
                                  Axel Berger wrote:
                                  > Don't know what I did wrong there,

                                  I still do not, but now it works all of a sudden, so the mistake must
                                  have been mine. This is from my current central stylesheet:

                                  HTML { margin-left:1em; margin-right:1em}
                                  BODY { margin-left:auto; margin-right:auto; max-width:700px}

                                  I have found that while all browsers show unstyled pages alright they
                                  sometimes let the letters touch the left window border on styled ones,
                                  which is both ugly and makes text hard to read. That's what the margins
                                  in HTML are there to fix.

                                  Thanks for making me look at it again.

                                  Axel
                                • bruce.somers@web.de
                                  loro-spam01-@telia.com wrote ... I would have expected CSS to AID one in making everything look exactly the same in every existing browser. That it does not,
                                  Message 16 of 18 , Apr 2, 2007
                                    loro-spam01-@... wrote

                                    > If you want everything to *look* exactly the same in every
                                    > existing browser, then it's questionable if there is any
                                    > point at all in using CSS.

                                    I would have expected CSS to AID one in "making everything look exactly the same in every existing browser."

                                    That it does not, makes it nearly useless, or at the least terribly irritating.

                                    Bruce
                                  • Corl DeLuna
                                    Hi Bruce, Yes, CSS can be terribly irritating, but not useless. Browse a few examples of CSS in action to see what I mean: http://www.cssplay.co.uk/ and
                                    Message 17 of 18 , Apr 2, 2007
                                      Hi Bruce,

                                      Yes, CSS can be terribly irritating, but not useless. Browse a few examples
                                      of CSS in action to see what I mean: http://www.cssplay.co.uk/ and
                                      http://www.csszengarden.com/ and consider
                                      http://developer.yahoo.com/yui/reset/ to take most of the CSS blues away.

                                      Best,
                                      Corl


                                      -----Original Message-----
                                      From: ntb-html@yahoogroups.com [mailto:ntb-html@yahoogroups.com] On Behalf
                                      Of bruce.somers@...
                                      Sent: Monday, April 02, 2007 1:46 PM
                                      To: ntb-html@yahoogroups.com
                                      Subject: Re: [NH] Crediting a Photograph

                                      loro-spam01-@... wrote

                                      > If you want everything to *look* exactly the same in every existing
                                      > browser, then it's questionable if there is any point at all in using
                                      > CSS.

                                      I would have expected CSS to AID one in "making everything look exactly the
                                      same in every existing browser."

                                      That it does not, makes it nearly useless, or at the least terribly
                                      irritating.

                                      Bruce








                                      Fookes Software Home: http://www.fookes.com Yahoo! Groups Links
                                    • loro
                                      ... That s a tall order if CSS isn t supported or disabled. Just joking you! ;-) I was objecting the use of HTML to make things look pretty in old browsers
                                      Message 18 of 18 , Apr 2, 2007
                                        bruce.somers@... wrote:
                                        >I would have expected CSS to AID one in "making everything look exactly
                                        >the same in every existing browser."

                                        That's a tall order if CSS isn't supported or disabled. Just joking you! ;-)
                                        I was objecting the use of HTML to make things look pretty in old browsers
                                        that can't handle the CSS. Likewise I see nothing wrong in adding some
                                        fancy CSS fluff that maybe can't be seen in IE. It hurts no one. After all,
                                        CSS is supposed to be optional.

                                        Lotta
                                      Your message has been successfully submitted and would be delivered to recipients shortly.