47 users online (1 members and 46 guests)  

Thread: topmarin


  Results 1 to 10 of 10
  1. #1
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    topmarin

    how in CSS terms would you put "topmargin="0"? Cause I'm tryin to make my page XHTML compliant (yes, I've learned that now ) but it says that <body topmargin="0"> is not one of the codes available. Thanks in advance.

  2. #2
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    also

    what's the css term for <table bordercolor="darkblue"> or whatever, it says that's not part of it either.

  3. #3
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Sorry, d00d. Missed these two!

    Q1 - topmargin

    body {
    margin: 0px;
    padding: 0px;
    }

    i find that works well.

    For a table border, you either use

    td {
    border-color: #000069;
    border-width: 2px;
    border-style: solid;
    }

    or shortcut version -

    td {
    border: 2px solid #000069;
    }

    Thats for an 'old style' border, for a border round the tabe but NOT the individual cells, just substitute 'table' for 'td'.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  4. #4
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    one problem

    on the topmargin:

    It makes all margins=0, is there any way that I can just single out topmargin but leave the norm space for the leftmargin?

    bordercolor:

    It makes all the borders the same. I guess there's none that just single out a single border? like all my borders are all the same color but one.

    Anyways thanks for your help dean, maybe css can only go so far?

  5. #5
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    body {
    margin-top: 0px;
    }


    td.unique {
    border: 1px solid white;
    }
    td {
    bordeR: 1px solid black;
    }



    CSS is the ultimate. Use classes. use ids. Remember something called inheritance, if you define a standard td, then make a rule for your 'unique' tds.

    if that doesnt make sense, visit the css tutorials dave has in his database.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  6. #6
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    a bit of trouble

    *Topmargin works great, thanks*

    Dean could you provide an example of that?

    td.unique {
    border: 1px solid white;
    }

    How do you call on something like that? or rather how do you name it?

    Thanks in advance.

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Ermmm...

    if you define something as dot unique

    .unique

    Then you are defining a class

    So

    <td class="unique">Badger</td>

    Would be affected by the rules defined in .unique.

    Am I making sense? I hope not

    Plz, read my tutorials in Daves Tutorials section. It takes you through this stuff stage-by-stage.

    Also, I am writing somenew tutorials for somepeople.net (a domain I just bought )
    Last edited by QuietDean; 10-19-2001 at 03:15 PM.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    lol

    I got THAT part dean

    The thing that confused me was the "td".unqiue in front of it.

    I've had the

    .happy {
    blah blah blah
    }

    <div class="happy">

    part, but the td in front confused me. Last night (guess I was a little tired ) I kept tryin stuff like:

    td.unique border {
    blah blah blah
    }

    <td class="border">

    Know what I mean? Thanks for your help man, I thought the unique was part of the code

  9. #9
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    AHHHH!

    Right ..

    .happy {
    blah blah;
    }

    defines the class 'happy', as you know. This means that anything with 'class="happy"' in it has these rules applied.

    td.happy {
    blah blah;
    }

    would mean that only table cells with class="happy" in them would be affected, and

    td.happy p {
    blah blah;
    }

    means that <p> tags within table cells that have class="happy" in them would be affected.

    Have you tried the tutorials yet?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  10. #10
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    thanks

    I looked at the tutorials a couple days ago but I think I got it all figured out now



Tags for this Thread