Announcement

Collapse
No announcement yet.

Setting the Style format for a Cell in the Web Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Setting the Style format for a Cell in the Web Page

    In my asp page, I want to format the custom device name I have set using style rather than old fashioned hard coded html.

    I do not want to change STYLE.CSS, though I can get the effect I want if I change .tablecellcustom to different values.

    I would like instead to include the Style information in the format I use in my routine. Something like

    hs.SetDeviceStringByName DevName, _
    "<img src=""file.gif"" align=""absmiddle""><span style=""xxxxx""> Text Displayed</span>"

    What do I have to fill in where the xxxxx is to make the format work? I tried

    td.tablecellcustom { color : red; background : #EFEFEF; }

    but it doesn't work. I am sure it is easy for one of you CSS experts........

    #2
    Try :
    hs.SetDeviceStringByName DevName, _
    "<img src=""file.gif"" align=""absmiddle""><span style=""color:red; background:#EFEFEF;""> Text Displayed</span>"

    -Rupp
    ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Good thought but not quite enough: it sets the new red text description inside a surrounding box which is the background colour....but the whole thing is inside a black cell and I want to get rid of the black background for the cell.

      Comment


        #4
        HomeSeer puts the surrounding style in automatically; there's no way to stop it. So the box-within-a-box is the best you can do while using the built-in HomeSeer pages. To do better you need to build your own page. (This has been discussed quite a few times before.)

        Nucleus Home Automation | System Specs
        News, support, and updates for Rover, Network Monitor, TimeIcons, and more

        Comment


          #5
          I've stumbled onto some extras that I use in my style sheet that might help. In your background statement try adding url so that it reads like:
          background: #72729c url('disabled.gif')

          OR you could try adding: background-image: url('disabled.gif')

          You can specify different images in your html folder as your background that way. I use the above in my tablecelldisabled for instance so I can tell right away that certain events have been disabled.

          Comment


            #6
            Sorry to repeat it if it has been covered - as HS uses style.css I assumed that one could override one cell with the right Style File parameter.

            Does HS not do its applicaiton of the style "honestly"; ie it's not over-ridable at a cell level?

            Comment


              #7
              Ameridan:

              Very interesting suggestion: where did you find it?

              What it actually does is to repeat the image in the .gif file through the same area as the whole of the background part of the field. the field is, however, a table cell, so it still gets the rest of the area that counts as the cell in the default tablecellcustom background colo(u)r of black.

              Have you been able to get the whole cell to a different background colour?

              Comment


                #8
                <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Simon:
                Sorry to repeat it if it has been covered - as HS uses style.css I assumed that one could override one cell with the right Style File parameter.

                Does HS not do its applicaiton of the style "honestly"; ie it's not over-ridable at a cell level?<HR></BLOCKQUOTE>

                The problem isn't in the style sheet -- it's in how HomeSeer builds the pages. It'd be simple to make an HTML page that did what you want. But you can't change how HomeSeer builds the pages, and so you can't change how it builds the HTML page. All you can do is insert some text inside the cell, where it will appear after the part where HomeSeer specified the cell's style.

                If you're not sure what I mean, it's easy enough to see. Just do what Rupp said, then View Source on the resulting page. You'll see the HTML you put into the cell, and the HTML HomeSeer put around it, and you'll see how they interact to produce the effect described. Since you can't change the latter, you can't get what you want done by just changing the former.

                Nucleus Home Automation | System Specs
                News, support, and updates for Rover, Network Monitor, TimeIcons, and more

                Comment


                  #9
                  Point made - thanks. let's hope that Rich gets time to amend how the web page is made up at some point. It may be possible for him to draw on some library routines which didn't exist when he first wrote it, and which would automatically give the richer functionality.

                  For now, I will amend style.css (or go back to using &lt;tr&gt; and &lt;td&gt; tags the old fashioned way), both of which work fine - just wanted to be modern and generic!

                  Comment


                    #10
                    Sounds like you refernced a small gif and it tiles on you. Make a large gif of your desired color (maybe 1" X 3") and reference that. It works.

                    Comment

                    Working...
                    X