creating space in a webpage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • html on wheels
    New Member
    • Feb 2007
    • 35

    #16
    Here is the code I put on notepad, but I still get a blank screen. Perhaps you can see where my error lies.

    <html>
    <head>
    <body style="backgrou nd-color: 255,255,255">
    </head>
    <body>
    ... life's but a walking ...
    </body>
    </html>

    as to - example of what? I was referring to jhardman from the previous post.

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #17
      Like I said:
      <body style="backgrou nd-color: rgb(255,255,255 )">

      But your numbers will make it white so change the values to something pretty.

      Comment

      • d3vkit
        New Member
        • Nov 2006
        • 34

        #18
        Thought I'd give my 2 cents on an editor - I use notepad++. It's a simple editor with tabs and code colors. And for the next step past html/css, I went to php, which I found to be really helpful. Javascript is nice, but mostly provides little error checks and functionality things. PHP allows you to really create content dynamically. But both are good tools to have at ones disposal.

        Comment

        • html on wheels
          New Member
          • Feb 2007
          • 35

          #19
          I am embarrassed to say I was working with 255,255,255 (white), which explains why the background would not change. Thanks for noticing that - a huge help.

          I read one of your articles and ran my code through the validater you linked. I am not sure I understood the mistakes exactly, but I will figure them out.

          Comment

          • jhardman
            Recognized Expert Specialist
            • Jan 2007
            • 3405

            #20
            Originally posted by drhowarddrfine

            Tables are for data such as spreadsheets and similar layouts. CSS works fine in browsers and the only problematic one is usually IE but the problems with it are known and fixable. There is no need for spacer gifs anymore. That's what margins and padding are for.

            I have never, ever used tables for layout of any page I have ever created.
            Yes, I was aware of the w3c's position on table usage, but if you read further, their only objection is that they might not display right for non-graphical browsers (screen readers etc) which makes it a moot point if you are talking about positioning pictures or if all your page is in a table. Screen readers still have a problem reading css positioned text, because they read in the order the text appears in the code, not necessarily the order in which it is positioned on the screen.

            Last time I tried, neither the accursed IE (still the standard as far as sheer usage was concerned) nor the w3c's own Amaya browser (supplied for the purpose of testing your validated HTML) fully supported my validated css positioning, though every browser does a good job supporting css fonts.

            I choose to use the w3c guidelines as an ideal, and I agree that we should try to follow them, but not at the expense of making our sites look goofy.

            Comment

            • jhardman
              Recognized Expert Specialist
              • Jan 2007
              • 3405

              #21
              Ok, drhoward, I went to the seybold site and it was really funny. I've seen code that bad (empty cells just to pad the table!, a nested table rather than a bullet list! Honestly!) I see your point, but I'm not sure I'm ready to concede entirely.

              I don't think I'm as bad as those examples, I'm really a minimalist, and minimal code is easier than padding a table out to make a pretty bullet list

              Comment

              • drhowarddrfine
                Recognized Expert Expert
                • Sep 2006
                • 7434

                #22
                I choose to use the w3c guidelines as an ideal, and I agree that we should try to follow them, but not at the expense of making our sites look goofy.
                Of course, and if you follow the W3C, your pages will not look goofy. Unfortunately, IE has chosen not to keep their browser up to date with the W3C of which they are a member and advocate (so they claim).

                If you have any markup which validates but doesn't work in IE, then show it so we can fix IE. Valid code almost always works in every other browser.

                Comment

                • jhardman
                  Recognized Expert Specialist
                  • Jan 2007
                  • 3405

                  #23
                  Originally posted by html on wheels
                  Could you provide the code for a simplified example? I usually copy the code and run it on notepad to get a feel the advice I get on this forum.

                  Do you have any idea how to get a wider array of background colors with html? I seem to be stuck with yellow, blue, red, purple, etc. For some reason my computer will recognize names of colors and ff0000 styles for colors. But not 256,256,256 styles of colors. Any idea why the latter is not cutting the mustard?
                  Do you mean a simplified code of using spacer gifs? I feel a little ashamed giving that example after drhoward put me n my place, but it's really easy. For example:
                  Code:
                  <img src="myPony.gif" height="75" width="50" alt="a cute pony"><img
                  src="spacer.gif" height="1" width="50" border="0"><img src="myPuppy.gif"
                  height="75" width="50" alt="a cute puppy">
                  The spacer.gif works because it is really just one transparent pixel (so is easy to load) that the browser stretches to fit. But since it is transparent, it is obviously not visible, so you should see your pony picture and your puppy picture separated by 50 blank pixels. w3c says not to do this, and the seybold site drhoward linked to shows good examples of why not to do this: it is too easy to bog your code down with unnecessary markup when there is a straight-forward solution. I wouldn't fret too much over a little thing when you are just spacing pictures out like in my example above, but you could easily get carried away. So, if I'm not mistaken, drhoward and the w3c would say to code it like this:
                  Code:
                  <img src="myPony.gif" height="75" width="50" alt="a cute pony" style="margin: 0px 25px 0px 0px">
                  <img src="myPuppy.gif" height="75" width="50" alt="a cute puppy" style="margin: 0px 0px 0px 25px">
                  byt the way, in hexidecimal format you should still be able to use all of the same colors as rgb. You can use any hexidecimal number from 00 to ff. some browsers dither some colors, but there are at least 216 colors recognized by all (considered "web-safe"). These should be like 00 33 66 99 cc & ff in all combinations. The same applies to colors in RGB format (safe numbers would be 0, 51, 102, 153, 204, 255)

                  Comment

                  • AricC
                    Recognized Expert Top Contributor
                    • Oct 2006
                    • 1885

                    #24
                    Here is a link to some colors. If you page through there are a lot of colors.
                    Code:
                    background-color: #400000;

                    Comment

                    • html on wheels
                      New Member
                      • Feb 2007
                      • 35

                      #25
                      Originally posted by jhardman
                      Do you mean a simplified code of using spacer gifs? I feel a little ashamed giving that example after drhoward put me n my place, but it's really easy. For example:
                      Code:
                      <img src="myPony.gif" height="75" width="50" alt="a cute pony"><img
                      src="spacer.gif" height="1" width="50" border="0"><img src="myPuppy.gif"
                      height="75" width="50" alt="a cute puppy">
                      Code:
                      <img src="myPony.gif" height="75" width="50" alt="a cute pony" style="margin: 0px 25px 0px 0px">
                      <img src="myPuppy.gif" height="75" width="50" alt="a cute puppy" style="margin: 0px 0px 0px 25px">
                      I'll try it out tonight to get an idea. I do understand the concept. Thanks also to Aric and yourself for the color information as well as to Dr Howard. The next user document I design for my tech writing class is going to have a much more interesting layout than the last.
                      Also I read a bit about ASP. What is it about ASP that you attracts you to it? (ATTN Moderators. Am I allowed to ask this question in an html forum?)

                      Comment

                      • jhardman
                        Recognized Expert Specialist
                        • Jan 2007
                        • 3405

                        #26
                        Originally posted by html on wheels
                        Also I read a bit about ASP. What is it about ASP that attracts you to it?
                        I had learned a couple different BASICs when I was younger (qBASIC? gwBASIC, anyone?) so VBscript didn't sound so daunting when I was a newbie. I needed to access some databases, and I didn't want to worry about starting cgi.

                        Also, I liked the idea that I could do all of the coding in notepad (One of the aspects I always loved about HTML. It reminds me of good ol' WordPerfect).

                        Comment

                        Working...