Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Outline in tables?

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #27102

    Hi all,

    I’m trying to add an outline to a table, but it doesn’t work. I thought it might be because tables were not block elements (or that’s what I remember) I added a display:block to it, and the outline appeared, but everything was messesed up. So how do I go about adding an outline to the table?

    Thanks!

    #67635
    AshtonSanders
    Participant

    I would try giving it a border instead of an outline.

    If I’m not mistaken you can apply borders to <table>s and <tr>s.

    #67636

    I’m trying to make the 2px pop technique, but w/o images or extra markup, so I already used the border to make the dark shade, so I was planning to use outline to make the white shade, but it didn’t work.

    #67581
    Chris Coyier
    Keymaster

    Might just need to wrap it in a DIV with another border…

    #67642
    AshtonSanders
    Participant

    Hmmm… Yea. Tables are "display:table" so outline won’t really work for it…

    You can assign borders to the Table cells… not that that helps…

    Sounds like additional markup is the answer.

    #67842

    Yeah, that’s what I wanted to avoid. But there seem to be no other option. Thanks all for your help :) At least I’ll wrap the table with JS to keep my markup :P

    #67849
    AshtonSanders
    Participant
    "JorgeLainfiesta" wrote:
    At least I’ll wrap the table with JS to keep my markup :P

    Lol, why? That’s got to create much more lag than couple extra characters of HTML.

    Are you afraid of Div-itis Police?

    #67851
    "AshtonSanders" wrote:
    "JorgeLainfiesta" wrote:
    At least I’ll wrap the table with JS to keep my markup :P

    Lol, why? That’s got to create much more lag than couple extra characters of HTML.

    Are you afraid of Div-itis Police?

    Well, not actually. The design is for a board script, so I’d have to edit tons and tons of templates to make all tables I want to give the effect wrapped into another div xD

    #67853
    AshtonSanders
    Participant

    I see. That makes sense.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.