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

background

Expand Messages
  • Neil Felton
    Works a treat, Loro, and with the link in the doctype, I guess that is best to include, yes? ....is there also a way of aligning a background image left, right
    Message 1 of 5 , Oct 31, 2003
    • 0 Attachment
      Works a treat, Loro, and with the link in the doctype, I guess that is best to include, yes?
      ....is there also a way of aligning a background image left, right or center with css? Thought I would be lazy and try you with another. I am so greatful for the help.
      Neil


      [Non-text portions of this message have been removed]
    • loro
      ... I m glad. I really was afraid that I confused more than helped. The problem with CSS is that it never ends. It s like a head of cabbage. Lift one leaf and
      Message 2 of 5 , Oct 31, 2003
      • 0 Attachment
        Neil Felton wrote:
        >Works a treat, Loro,

        I'm glad. I really was afraid that I confused more than helped. The problem with CSS is that it never ends. It's like a head of cabbage. Lift one leaf and there's another and another and another. Hard to know when to stop.

        >and with the link in the doctype, I guess that is best to include, yes?

        I don't understand this part. The only difference that should make is that a doctype with URL puts modern browsers in Standards Mode. It haven't noticed that it affects this but maybe is does in some browser. What do you use? Could be that Moz in Quirks Mode emulates Netscape 4's bug with relative URLs in style sheets in which case the path to the image would be wrong. Seems stupid though. I have a new drive and haven't got anything but IE5 on yet so I can't check.

        >....is there also a way of aligning a background image left, right or center with css? Thought I would be lazy and try you with another. I am so greatful for the help.

        Can't sleep so I can just as well make myself useful. You can do more than left-right-center. You can place it pretty much where you want. There is some buggery but if you don't get too fancy it works fairly well.

        <http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-position>

        You can put this one in the background shorthand too. ;-)

        Lotta
      • Neil Felton
        ... I certainly don t understand the pros and cons of URL in the doc type. Be interested to hear some comments. I ve now got IE6. To reiterate the initial
        Message 3 of 5 , Oct 31, 2003
        • 0 Attachment
          > Thanks Loro the stuff on background was heaps of help,
          I certainly don't understand the pros and cons of URL in the doc type. Be
          interested to hear some comments. I've now got IE6. To reiterate the initial
          challenge, I had some code that wasn't quite right - unbeknown to me, till
          Loro put me right - but managed to get it functioning by removing the URL in
          the doc type. I now have that all sussed, but I have some of my pages with
          the URL and some without. I have a fairly loose doc type
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
          It was with the URL that the quirky code didn't work, so I reckon that's
          probably a good thing. I mean how loose does one want to be? I am just about
          entirely css now but some of my older pages are not....
          >
          Loro wrote:

          > I don't understand this part. The only difference that should make is that
          a doctype with URL puts modern browsers in Standards Mode. It haven't
          noticed that it affects this but maybe is does in some browser. What do you
          use? Could be that Moz in Quirks Mode emulates Netscape 4's bug with
          relative URLs in style sheets in which case the path to the image would be
          wrong. Seems stupid though. I have a new drive and haven't got anything but
          IE5 on yet so I can't check.
          >
        • loro
          ... It s browser trickery. When all browsers went for greater standard compliance they had to come up with something so legacy documents wouldn t render as a
          Message 4 of 5 , Oct 31, 2003
          • 0 Attachment
            Neil Felton wrote:
            >I certainly don't understand the pros and cons of URL in the doc type. Be
            >interested to hear some comments.

            It's browser trickery. When all browsers went for greater standard compliance they had to come up with something so legacy documents wouldn't render as a total mess in new browsers. Newer browsers have two rendering modes called Standards (or Strict) and Quirks Mode. When in Quirks Mode they emulate earlier versions of themselves. The first browser that did this used the doctype as a trigger for what mode to use. All the others of course followed suite but not necessarily in the same way. IMO it's all idiotic. Better would have been to invent a meta tag or something for the purpose. Anyway, basically a doctype declaration *with* a URL gives you Standards Mode. You can find a lot about this if you google for "doctype switching". Here are a few...

            Activating the Right Layout Mode Using the Doctype Declaration
            <http://www.hut.fi/u/hsivonen/doctype.html>
            Doctype switching and standards compliance in Internet Explorer and Netscape
            <http://gutfeldt.ch/matthias/articles/doctypeswitch.html>
            Mozilla's DOCTYPE sniffing
            <http://www.mozilla.org/docs/web-developer/quirks/doctypes.html>
            CSS Enhancements in Internet Explorer 6
            <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp>
            The Opera 7 DOCTYPE Switches
            <http://www.opera.com/docs/specs/doctype/>

            >It was with the URL that the quirky code didn't work, so I reckon that's
            >probably a good thing. I mean how loose does one want to be? I am just about
            >entirely css now but some of my older pages are not....

            Yes, I think most people that even bother to use a doctype wants standards mode. Something that can be handy to know though is that if you put anything at all before the doctype line IE6 goes into quirks mode. It may be the XML declaration if you write XHTML or simply an ordinary comment. If one encounters on of IE6's nasty display bugs it often helps to put it in quirks mode. This way one can do that while keeping other browsers in Strict Mode. Of course IE then displays other bugs but that doesn't really matter since one has to take care of the old IE5.x bugs anyway. LOL

            Imagine how easy this would be if it wasn't for browsers!


            L.
          • Neil Felton
            ... From: loro To: Sent: Saturday, November 01, 2003 7:13 PM Subject: Re: [NH] background ... Oh well a
            Message 5 of 5 , Nov 1, 2003
            • 0 Attachment
              ----- Original Message -----
              From: "loro" <loro-spam01-@...>
              To: <ntb-html@yahoogroups.com>
              Sent: Saturday, November 01, 2003 7:13 PM
              Subject: Re: [NH] background


              >Loro wrote:
              >
              > It's browser trickery. .....

              Oh well a bit of bed time reading there. Thanks Loro
              Neil
            Your message has been successfully submitted and would be delivered to recipients shortly.