DIV and BGCOLOR

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

    DIV and BGCOLOR

    Am I confused ot shouldn't I be able to say something like this:


    <div bgcolor="#CCCCF F">
    .....
    </div>


    And have that section of my page/table be a light blue background?

    Tried it inside the HTML as well as in a style sheet, and nothing.

    Thanks ahead


  • Daniel Kaplan

    #2
    Re: DIV and BGCOLOR

    "Daniel Kaplan" <NoSPam@NoSpam. comwrote in message
    news:1222126516 .103971@nntp.ac ecape.com...
    <div bgcolor="#CCCCF F">
    ....
    </div>
    I meant to say that if the DIV is inside a table it won't work....if it's
    outside the table, then it does...Surely there must be a way to use div to
    change just a piece or portion of a table?


    Comment

    • dorayme

      #3
      Re: DIV and BGCOLOR

      In article <1222126516.103 971@nntp.acecap e.com>,
      "Daniel Kaplan" <NoSPam@NoSpam. comwrote:
      Am I confused ot shouldn't I be able to say something like this:
      >
      >
      <div bgcolor="#CCCCF F">
      ....
      </div>
      >
      >
      And have that section of my page/table be a light blue background?
      >
      Tried it inside the HTML as well as in a style sheet, and nothing.
      >
      <http://dorayme.890m.co m/alt/kaplan.html>

      --
      dorayme

      Comment

      • C A Upsdell

        #4
        Re: DIV and BGCOLOR

        Daniel Kaplan wrote:
        Am I confused ot shouldn't I be able to say something like this:
        >
        >
        <div bgcolor="#CCCCF F">
        ....
        </div>
        >
        >
        And have that section of my page/table be a light blue background?
        >
        Tried it inside the HTML as well as in a style sheet, and nothing.
        Use CSS instead to style your page.

        Comment

        • Daniel Kaplan

          #5
          Re: DIV and BGCOLOR


          "dorayme" <doraymeRidThis @optusnet.com.a uwrote in message
          news:doraymeRid This-
          >
          <http://dorayme.890m.co m/alt/kaplan.html>
          >
          But how about within a part of a table? Like spanning multiple rows and or
          cells, while keeping the rest of the table alone. Is that possible? Cause
          I can't do that. I can move the DIV tags to the front and end of the table
          and get the entire table, but not pieces.

          Please tell me it's possible.

          Thanks regardless...


          Comment

          • dorayme

            #6
            Re: DIV and BGCOLOR

            In article <1222131464.632 667@nntp.acecap e.com>,
            "Daniel Kaplan" <NoSPam@NoSpam. comwrote:
            "dorayme" <doraymeRidThis @optusnet.com.a uwrote in message
            news:doraymeRid This-

            <http://dorayme.890m.co m/alt/kaplan.html>
            But how about within a part of a table? Like spanning multiple rows and or
            cells, while keeping the rest of the table alone. Is that possible? Cause
            I can't do that. I can move the DIV tags to the front and end of the table
            and get the entire table, but not pieces.
            >
            Please tell me it's possible.
            >
            Hand on my central CPU, yes:

            <http://dorayme.890m.co m/alt/kaplan2.html>

            --
            dorayme

            Comment

            • Daniel Kaplan

              #7
              Re: DIV and BGCOLOR

              "dorayme" <doraymeRidThis @optusnet.com.a uwrote in message
              news:doraymeRid This-61331B.11251523 092008@web.aioe .org...
              In article <1222131464.632 667@nntp.acecap e.com>,
              "Daniel Kaplan" <NoSPam@NoSpam. comwrote:
              >
              >"dorayme" <doraymeRidThis @optusnet.com.a uwrote in message
              >news:doraymeRi dThis-
              >
              >Please tell me it's possible.
              >>
              >
              Hand on my central CPU, yes:
              >
              <http://dorayme.890m.co m/alt/kaplan2.html>
              >
              I feel terrible clarifying some more...and by the way thanks for going to
              the trouble of actually making samples to show me, BUT....I wanted to do it
              as background color, so you wouldn't see the cell lines.....Is THAT
              possible??


              Comment

              • dorayme

                #8
                Re: DIV and BGCOLOR

                In article <1222134337.293 977@nntp.acecap e.com>,
                "Daniel Kaplan" <NoSPam@NoSpam. comwrote:
                "dorayme" <doraymeRidThis @optusnet.com.a uwrote in message
                news:doraymeRid This-61331B.11251523 092008@web.aioe .org...
                In article <1222131464.632 667@nntp.acecap e.com>,
                "Daniel Kaplan" <NoSPam@NoSpam. comwrote:
                "dorayme" <doraymeRidThis @optusnet.com.a uwrote in message
                news:doraymeRid This-

                Please tell me it's possible.
                >
                Hand on my central CPU, yes:

                <http://dorayme.890m.co m/alt/kaplan2.html>
                >
                I feel terrible clarifying some more...and by the way thanks for going to
                the trouble of actually making samples to show me, BUT....I wanted to do it
                as background color, so you wouldn't see the cell lines.....Is THAT
                possible??
                Yes, certainly. You just have to change the border from my 1px to 0.

                td {border: 0;} or just leave out a border instruction altogether in
                many cases.

                Time to read about CSS and HTML. I suggest



                but always just use a 4.01 HTML doctype for now.

                --
                dorayme

                Comment

                • Daniel Kaplan

                  #9
                  Re: DIV and BGCOLOR

                  "dorayme" <doraymeRidThis @optusnet.com.a uwrote in message
                  news:doraymeRid This-999F73.12243523 092008@web.aioe .org...
                  Yes, certainly. You just have to change the border from my 1px to 0.
                  >
                  td {border: 0;} or just leave out a border instruction altogether in
                  many cases.
                  >
                  Time to read about CSS and HTML. I suggest
                  >

                  >
                  but always just use a 4.01 HTML doctype for now.

                  I got it now, so thanks. But strange it didn't work before. I am wondering
                  wether it is related to the "border-collapse" property which up till now I
                  was not aware of?????

                  Thanks for your help so much.


                  Comment

                  • Ben C

                    #10
                    Re: DIV and BGCOLOR

                    On 2008-09-22, Daniel Kaplan <NoSPam@NoSpam. comwrote:
                    "Daniel Kaplan" <NoSPam@NoSpam. comwrote in message
                    news:1222126516 .103971@nntp.ac ecape.com...
                    >
                    ><div bgcolor="#CCCCF F">
                    >....
                    ></div>
                    >
                    I meant to say that if the DIV is inside a table it won't work....if it's
                    outside the table, then it does...Surely there must be a way to use div to
                    change just a piece or portion of a table?
                    No. You can use div inside a table cell or outside the whole table. If
                    you want to apply styles to portions of the table, use CSS selectors.

                    This kind of thing:

                    <table>
                    <div>
                    <tr>

                    is invalid (and not in a way you get away with).

                    Comment

                    • Jukka K. Korpela

                      #11
                      Re: DIV and BGCOLOR

                      Daniel Kaplan wrote:
                      Am I confused
                      Yes you are. But admittedly you gave a clue of it in your forged From field.
                      ot shouldn't I be able to say something like this:
                      >
                      >
                      <div bgcolor="#CCCCF F">
                      Well, what prevents you from breaking HTML rules? Maybe some browser
                      actually implements such nonstandard constructs, and you end up with setting
                      background color without setting content color.
                      And have that section of my page/table be a light blue background?
                      If it's a section, you should have something like

                      <div class="section ads">
                      ...
                      </div>

                      and the specific rendering suggestions should appear in CSS, not in HTML.
                      This means that you are more or less in a wrong group. HTMLwise, we can just
                      say that your markup (in your HTML snippet) is invalid and all bets are off.
                      Tried it inside the HTML as well as in a style sheet, and nothing.
                      You gave no URL of your best attempt, so yes, you are confused.

                      --
                      Yucca, http://www.cs.tut.fi/~jkorpela/

                      Comment

                      Working...