www.webdeveloper.com
Results 1 to 5 of 5

Thread: Cell Spacing with Classes and more

  1. #1
    Join Date
    Jan 2005
    Location
    Okieland >.<
    Posts
    9

    Cell Spacing with Classes and more

    Is there any way to define a cell spacing attribute for a class? I'm trying to go ahead and define the cellspacing="#" attribute with CSS, but I can't find any css properties that will do that for me. I just want some space between the border of my table and the border of my cells.

    Oh, and does Firefox not display class attributes? Because my class information loads on my IE browser while it does not on Firefox. And if it doesn't, how does xanga get their class info to show on firefox? My xanga page loads just fine with their class information that you define on your look and feel, but it won't load the class that I created. I'm terribly confused. This is what I get for trying to mod my xanga page... so sue me for wanting to create something of my own just like I create my regular pages, lol.

    All of this is making me wonder whether or not switching to Firefox for my primary browser was a good idea or not. It's hindering me when it comes to some of my coding...

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,537
    I'm not sure what you mean by "display class attributes".

    As far as cell spacing:
    Code:
    <style type="text/css">
    table {
      border-collapse: separate;
    }
    th, td {
      margin: 5px;  // this will be your cell spacing
      padding: 3px;  // this will be your cell padding
    }
    </style>
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jan 2005
    Location
    Okieland >.<
    Posts
    9
    Well, theres one problem solved- thanks!

    And on the displaying the class attributes, for an example, I want all the tables to have orange borders and all the TDs to have green borders, without having to tell the browser this every time I put a table in. And Firefox isn't showing any of the things I say the class should display when I define them in my style sheet.

    If you happen to have it, the page I'm talking about is at http://www.xanga.com/hikari_07. Firefox is appearing to pick up some of the attributes, like the orange border that goes all the way around the blog itself, but not the things for my navigation table between the blog and header or the background color of the profile where my picture is. (The black was specified in the Look and Feel of my Xanga)

    I'm not going to worry about it tonight lol, I've got the basic look I was going for. I tend to make more and more mistakes as it gets later in the night... :-P

    Thanks for your help

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,537
    You've got a lot of errors in your CSS. Some are outright errors, some are due to you using non-standard (probably IE-specific) attributes. See http://jigsaw.w3.org/css-validator/v....com/hikari_07

    The HTML validator couldn't validate the page because of some spurious character it could not deal with on line 597: http://validator.w3.org/check?verbos....com/hikari_07 .

    One of the things the HTML validator would have complained about is that your document does not begin with a doctype. This by itself will cause browser incompatibilties, because without a doctype IE runs in non-standards-compliant "quirks mode". See http://www.w3.org/QA/2002/04/valid-dtd-list.html for more info.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    border-color:FF9F40; should be border-color:#FF9F40;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles