Moving code from external stylesheet to internal

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

    Moving code from external stylesheet to internal

    Hi
    I have this entry in my stylesheet main1.css:

    #head {
    width: 310px;
    height: 60px;
    float: left;
    display: block;
    background-image: url(logo.jpg);
    background-position: left top;
    background-repeat: no-repeat;
    }

    I am trying to move it into the web page code for Search Engine
    Optimisation purposes, thus:

    <div id="head-logo" style="width:31 0px; height:115px; float:left;
    background-position: left top; display:block;" ><img src="logo.jpg"
    width="178" height="59" alt="Driving Instructor Insurance - Instructor
    Cover"></div>

    The logo in the revised version comes out an inch or so to the right
    of its previous position. What am I doing wrong?

    Stapes

  • Andy Dingley

    #2
    Re: Moving code from external stylesheet to internal

    On 6 Aug, 14:34, Stapes <steve.sta...@g mail.comwrote:
    I have this entry in my stylesheet main1.css:
    I am trying to move it into the web page code for Search Engine
    Optimisation purposes, thus:
    Ridiculously pointless, so stop trying to do that.

    Just where did you find this crazy piece of wrong-headed voodoo?

    Comment

    • Beauregard T. Shagnasty

      #3
      Re: Moving code from external stylesheet to internal

      Stapes wrote:
      "Beauregard T. Shagnasty" wrote:
      >Why? Do you think people search for .. "width:310p x" ?
      >
      No - I am hoping they might pick up the alt text to the image.
      The alt text should be in the HTML <imgelement (where it is), and
      isn't part of your style sheet, or inline style. They will find it,
      regardless of your styling method.

      ....
      Yes - I have not tampered with the original style sheet. So I have
      given my div a different name because I am no longer using the css
      file version.
      It would be less than desirable to fill all your pages with the same
      styles. There is a considerable ease to maintenance if you use one
      external style sheet, and less of a burden to people downloading the
      pages.
      >..so it would be best if you could provide URLs to the two test
      >cases, instead of relying on possibly incomplete code snippets here.
      >Other things might be the reason, such as the DOCTYPE in use.
      >
      The URL is http://www.instructorcover.co.uk/index.aspx. Compare with
      Is this a new site/page? If so, it should use a Strict doctype, as you
      aren't Transitioning from anything, such as a legacy page.



      You seem to be on the XHTML bandwagon, though most will recommend using
      HTML 4.01 Strict.

      You will also want to drop the HTML prolog
      (<?xml version="1.0" encoding="iso-8859-1"?>)
      as having anything preceding the DOCTYPE will throw IE6 into quirks
      mode.
      http://www.instructorcover.co.uk/about us.aspx, which uses the CSS
      file, but has the same heading.
      "about us.aspx" not found. Neither was "about_us.aspx" ,
      "about-us.aspx", "aboutus.as px" or "about".

      --
      -bts
      -Motorcycles defy gravity; cars just suck

      Comment

      • Stapes

        #4
        Re: Moving code from external stylesheet to internal

        On 6 Aug, 15:55, "Beauregard T. Shagnasty"
        <a.nony.m...@ex ample.invalidwr ote:
        Stapes wrote:
        "Beauregard T. Shagnasty" wrote:
        Why? Do you think people search for .. "width:310p x" ?
        >
        No - I am hoping they might pick up the alt text to the image.
        >
        The alt text should be in the HTML <imgelement (where it is), and
        isn't part of your style sheet, or inline style. They will find it,
        regardless of your styling method.
        Surely not! - where is the alt text in this:

        #head {
        width: 310px;
        height: 60px;
        float: left;
        display: block;
        background-image: url(logo.jpg);
        background-position: left top;
        background-repeat: no-repeat;
        }



        >
        ...
        >
        Yes - I have not tampered with the original style sheet. So I have
        given my div a different name because I am no longer using the css
        file version.
        >
        It would be less than desirable to fill all your pages with the same
        styles. There is a considerable ease to maintenance if you use one
        external style sheet, and less of a burden to people downloading the
        pages.
        >
        ..so it would be best if you could provide URLs to the two test
        cases, instead of relying on possibly incomplete code snippets here.
        Other things might be the reason, such as the DOCTYPE in use.
        >
        The URL ishttp://www.instructorc over.co.uk/index.aspx. Compare with
        >
        Is this a new site/page? If so, it should use a Strict doctype, as you
        aren't Transitioning from anything, such as a legacy page.
        >

        >
        You seem to be on the XHTML bandwagon, though most will recommend using
        HTML 4.01 Strict.
        >
        You will also want to drop the HTML prolog
        (<?xml version="1.0" encoding="iso-8859-1"?>)
        as having anything preceding the DOCTYPE will throw IE6 into quirks
        mode.
        >
        http://www.instructorcover.co.uk/aboutus.aspx, which uses the CSS
        file, but has the same heading.
        >
        "about us.aspx" not found. Neither was "about_us.aspx" ,
        "about-us.aspx", "aboutus.as px" or "about".

        >
        --
        -bts
        -Motorcycles defy gravity; cars just suck

        Comment

        • Stapes

          #5
          Re: Moving code from external stylesheet to internal

          On 6 Aug, 15:51, Andy Dingley <ding...@codesm iths.comwrote:
          On 6 Aug, 14:34, Stapes <steve.sta...@g mail.comwrote:
          >
          I have this entry in my stylesheet main1.css:
          I am trying to move it into the web page code for Search Engine
          Optimisation purposes, thus:
          >
          Ridiculously pointless, so stop trying to do that.
          >
          Just where did you find this crazy piece of wrong-headed voodoo?
          Just about everyone but you.

          Wrong-headed voodoo saint.


          Comment

          • John Hosking

            #6
            Re: Moving code from external stylesheet to internal

            Stapes wrote:
            On 6 Aug, 15:55, "Beauregard T. Shagnasty"
            <a.nony.m...@ex ample.invalidwr ote:
            >Stapes wrote:
            >>"Beauregard T. Shagnasty" wrote:
            >>>Why? Do you think people search for .. "width:310p x" ?
            >>No - I am hoping they might pick up the alt text to the image.
            >The alt text should be in the HTML <imgelement (where it is), and
            >isn't part of your style sheet, or inline style. They will find it,
            >regardless of your styling method.
            >
            Surely not! - where is the alt text in this:
            >
            #head {
            width: 310px;
            height: 60px;
            float: left;
            display: block;
            background-image: url(logo.jpg);
            background-position: left top;
            background-repeat: no-repeat;
            }
            Nowhere, it'd be in the <div id="head"><img src="" alt =""></div>
            if you had one.

            You misunderstand Beauregard, but he misunderstood you. I think you
            misunderstood him through either careless reading or a lack of
            experience. I reckon he misunderstood you because you want something so
            weird, and your initial explanation didn't make it clear.

            You want a logo to be in the markup (instead of being a BG image) so
            that you can provide an alt image, in the rather twisted belief that
            search engines will see the alt property and drive traffic to your site
            and you will become rich beyond your dreams. Or something.

            Don't do that. It's perverted. You're messing up (and bulking up) the
            markup when the logo is really just decorative. It's not content, so
            leave it out of the content (HTML). It belongs in the CSS, so leave it
            there.

            "Driving Instructor Insurance - Instructor Cover" is terrible (morally
            invalid) alt text anyway. I'm blind to the image in question, and this
            alt text is wholly inadequate to convey to me what the missing image
            represents.

            BTW, you can omit the background-position: left top; display:block; in
            your first inline attempt (your OP). You've got no background image in
            that case, so background-position is meaningless. And the div is
            probably display:block by default, so skip that too.

            Best of all, though, leave the logo as a BG image in the CSS.
            >...
            >>
            In future, please trim content unnecessary to your response.

            --
            John
            Pondering the value of the UIP: http://blinkynet.net/comp/uip5.html

            Comment

            • Stapes

              #7
              Re: Moving code from external stylesheet to internal

              On 6 Aug, 16:28, John Hosking <J...@DELETE.Ho sking.name.INVA LID>
              wrote:
              Stapes wrote:
              On 6 Aug, 15:55, "Beauregard T. Shagnasty"
              <a.nony.m...@ex ample.invalidwr ote:
              Stapes wrote:
              >"Beauregard T. Shagnasty" wrote:
              >>Why? Do you think people search for .. "width:310p x" ?
              >No - I am hoping they might pick up the alt text to the image.
              The alt text should be in the HTML <imgelement (where it is), and
              isn't part of your style sheet, or inline style. They will find it,
              regardless of your styling method.
              >
              Surely not! - where is the alt text in this:
              >
              #head {
              width: 310px;
              height: 60px;
              float: left;
              display: block;
              background-image: url(logo.jpg);
              background-position: left top;
              background-repeat: no-repeat;
              }
              >
              Nowhere, it'd be in the <div id="head"><img src="" alt =""></div>
              if you had one.
              >
              You misunderstand Beauregard, but he misunderstood you. I think you
              misunderstood him through either careless reading or a lack of
              experience. I reckon he misunderstood you because you want something so
              weird, and your initial explanation didn't make it clear.
              >
              You want a logo to be in the markup (instead of being a BG image) so
              that you can provide an alt image, in the rather twisted belief that
              search engines will see the alt property and drive traffic to your site
              and you will become rich beyond your dreams. Or something.
              >
              Don't do that. It's perverted. You're messing up (and bulking up) the
              markup when the logo is really just decorative. It's not content, so
              leave it out of the content (HTML). It belongs in the CSS, so leave it
              there.
              >
              "Driving Instructor Insurance - Instructor Cover" is terrible (morally
              invalid) alt text anyway. I'm blind to the image in question, and this
              alt text is wholly inadequate to convey to me what the missing image
              represents.
              >
              BTW, you can omit the background-position: left top; display:block; in
              your first inline attempt (your OP). You've got no background image in
              that case, so background-position is meaningless. And the div is
              probably display:block by default, so skip that too.
              >
              Best of all, though, leave the logo as a BG image in the CSS.
              >
              ...
              >
              In future, please trim content unnecessary to your response.
              >
              --
              John
              Pondering the value of the UIP:http://blinkynet.net/comp/uip5.html- Hide quoted text -
              >
              - Show quoted text -
              Well John,
              we paid for a report from Neutralize: Independent Internet Marketing
              Services, who say this:

              The present top header should be seperated so that the logo can be
              used as a home page link, this would enable the optimisation of the
              page with added alt text; alt tag and link can then be applied.

              What exactly do you mean by 'morally invalid'? Is there anything
              morally valid about car insurance?

              Stapes

              Comment

              • Beauregard T. Shagnasty

                #8
                Re: Moving code from external stylesheet to internal

                Stapes wrote:
                "Beauregard T. Shagnasty" wrote:
                >Stapes wrote:
                >>"Beauregard T. Shagnasty" wrote:
                >>>Why? Do you think people search for .. "width:310p x" ?
                >>
                >>No - I am hoping they might pick up the alt text to the image.
                >>
                >The alt text should be in the HTML <imgelement (where it is), and
                >isn't part of your style sheet, or inline style. They will find it,
                >regardless of your styling method.
                >
                Surely not! - where is the alt text in this:
                I was referring to the: alt="Driving Instructor Insurance - Instructor
                Cover" in your sample in your first post.
                #head {
                width: 310px;
                height: 60px;
                float: left;
                display: block;
                background-image: url(logo.jpg);
                background-position: left top;
                background-repeat: no-repeat;
                }
                You can't place alt text on a *background* image, no matter how you call
                it.

                Try changing
                margin-left: auto;
                to
                margin-left: 0px;
                in
                #Heading { ...

                Hopefully, you will study the rest of my points.

                --
                -bts
                -Motorcycles defy gravity; cars just suck

                Comment

                • Beauregard T. Shagnasty

                  #9
                  Re: Moving code from external stylesheet to internal

                  Stapes wrote:
                  On 6 Aug, 15:51, Andy Dingley <ding...@codesm iths.comwrote:
                  >On 6 Aug, 14:34, Stapes <steve.sta...@g mail.comwrote:
                  >>
                  >>I have this entry in my stylesheet main1.css:
                  >>I am trying to move it into the web page code for Search Engine
                  >>Optimisatio n purposes, thus:
                  >>
                  >Ridiculously pointless, so stop trying to do that.
                  >>
                  >Just where did you find this crazy piece of wrong-headed voodoo?
                  >
                  Just about everyone but you.
                  >
                  Wrong-headed voodoo saint.
                  I agree with Andy.

                  As stated (or implied), Google will read the external style sheet for
                  every page it attempts to index. It does not need to be within the
                  separate page code itself. (Another SEO scam bites the dust?)

                  --
                  -bts
                  -also a wrong-headed voodoo saint?

                  Comment

                  • Windsun

                    #10
                    Re: Moving code from external stylesheet to internal

                    There is no such thing as alt text in CSS
                    ............... ............... ............... ............... ............... ............... .........
                    "Stapes" <steve.staple@g mail.comwrote in message
                    news:1186412759 .149271.179090@ o61g2000hsh.goo glegroups.com.. .
                    >
                    Surely not! - where is the alt text in this:
                    >
                    #head {
                    width: 310px;
                    height: 60px;
                    float: left;
                    display: block;
                    background-image: url(logo.jpg);
                    background-position: left top;
                    background-repeat: no-repeat;
                    }
                    >
                    >
                    >
                    >
                    >>
                    >...
                    >>
                    Yes - I have not tampered with the original style sheet. So I have
                    given my div a different name because I am no longer using the css
                    file version.
                    >>
                    >It would be less than desirable to fill all your pages with the same
                    >styles. There is a considerable ease to maintenance if you use one
                    >external style sheet, and less of a burden to people downloading the
                    >pages.
                    >>
                    >..so it would be best if you could provide URLs to the two test
                    >cases, instead of relying on possibly incomplete code snippets here.
                    >Other things might be the reason, such as the DOCTYPE in use.
                    >>
                    The URL ishttp://www.instructorc over.co.uk/index.aspx. Compare with
                    >>
                    >Is this a new site/page? If so, it should use a Strict doctype, as you
                    >aren't Transitioning from anything, such as a legacy page.
                    >>
                    >http://www.w3.org/QA/2002/04/valid-dtd-list.html
                    >>
                    >You seem to be on the XHTML bandwagon, though most will recommend using
                    >HTML 4.01 Strict.
                    >>
                    >You will also want to drop the HTML prolog
                    >(<?xml version="1.0" encoding="iso-8859-1"?>)
                    >as having anything preceding the DOCTYPE will throw IE6 into quirks
                    >mode.
                    >>
                    >http://www.instructorcover.co.uk/aboutus.aspx, which uses the CSS
                    file, but has the same heading.
                    >>
                    >"about us.aspx" not found. Neither was "about_us.aspx" ,
                    >"about-us.aspx", "aboutus.as px" or "about".
                    >

                    >
                    >>
                    >--
                    > -bts
                    > -Motorcycles defy gravity; cars just suck
                    >
                    >

                    Comment

                    • Beauregard T. Shagnasty

                      #11
                      Re: Moving code from external stylesheet to internal

                      Stapes wrote:
                      Well John,
                      we paid for a report from Neutralize: Independent Internet Marketing
                      Services,
                      Oh no... hope you didn't pay too much.
                      who say this:
                      >
                      The present top header should be seperated so that the logo can be
                      used as a home page link, this would enable the optimisation of the
                      page with added alt text; alt tag and link can then be applied.
                      "Seperated" ?

                      <http://www.neutralize. com/internet_market ing_services/search_engine_o ptimisation.htm >

                      Typical buzzword fluff:

                      "Our full service organic search engine optimisation (SEO) packages
                      ensure ROI through indexability and maximum visibility within
                      algorithmic search engines such as Google, MSN & Yahoo! Search."

                      <gag>

                      The only true SEO techniques I've run across are offers to rewrite a
                      site's code and content, using real (hopefully unique) keywords within
                      the visible content.
                      What exactly do you mean by 'morally invalid'? Is there anything
                      morally valid about car insurance?
                      It costs way too much?

                      --
                      -bts
                      -Motorcycles defy gravity; cars just suck

                      Comment

                      • Andy Dingley

                        #12
                        Re: Moving code from external stylesheet to internal

                        On 6 Aug, 17:18, "Beauregard T. Shagnasty"
                        <a.nony.m...@ex ample.invalidwr ote:
                        "Our full service organic search engine optimisation (SEO) packages
                        Organic? You mean, cheap interns?


                        "Organic Search Engine Optimisation is People!"

                        Comment

                        • Andy Dingley

                          #13
                          Re: Moving code from external stylesheet to internal

                          On 7 Aug, 09:33, Stapes <steve.sta...@g mail.comwrote:
                          Would you say the same regarding the top header here:http://www.hotel-victoria.co.uk/, which uses /Portals/0/Hotel/Flash/
                          Banner.swf in flash?
                          Flash is problematic for accessible content, pretty good for eye
                          candy.

                          The hotel site you cite is an interesting example. Usually Flash
                          headers like this are terrible: a hefty download to a trivial thing
                          that isn't worth it, and often ugly too. This one though is better
                          done than the usual and is an attractive and valuable addition to the
                          site.

                          It's still eye candy though. It's a scrolling wallpaper that no-one
                          can focus on, no-one can understand and it's just there to look good.
                          If it did have alt text, the text would be "Opulence. Now believe us".

                          It's not content. Nor is its _function_ to drive search engines. So
                          don't worry about in that sense. If you do need content (real content)
                          about the rooms shown on the banner, then write some content and some
                          proper <img>s to describe them, and treat that as accessible and
                          spiderable content.

                          Comment

                          • Chris F.A. Johnson

                            #14
                            Re: Moving code from external stylesheet to internal

                            On 2007-08-07, Stapes wrote:
                            Would you say the same regarding the top header here:
                            http://www.hotel-victoria.co.uk/, which uses /Portals/0/Hotel/Flash/
                            Banner.swf in flash?
                            The flash is the least of the problems on that page; it's just
                            distracting. See how the page looks in my browser:
                            <http://cfaj.freeshell. org/testing/hv.jpg>.

                            --
                            Chris F.A. Johnson <http://cfaj.freeshell. org>
                            =============== =============== =============== =============== =======
                            Author:
                            Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

                            Comment

                            • Jonathan N. Little

                              #15
                              Re: Moving code from external stylesheet to internal

                              Andy Dingley wrote:
                              On 7 Aug, 09:33, Stapes <steve.sta...@g mail.comwrote:
                              >
                              >Would you say the same regarding the top header here:http://www.hotel-victoria.co.uk/, which uses /Portals/0/Hotel/Flash/
                              >Banner.swf in flash?
                              >
                              Flash is problematic for accessible content, pretty good for eye
                              candy.
                              And on dialup for more than a minute all I saw was a pretty white rectangle!

                              --
                              Take care,

                              Jonathan
                              -------------------
                              LITTLE WORKS STUDIO

                              Comment

                              Working...