Issue with applying dotted border to cells in table design

后端 未结 9 1059
不知归路
不知归路 2021-01-12 07:48

Here\'s my fiddle:

http://jsfiddle.net/gFA4p/84/

In this screenshot, the green lines represent where I\'m trying to apply dotted lines.

9条回答
  •  -上瘾入骨i
    2021-01-12 08:22

    With jQuery, you can:

    • find all elements in that wanna-have-geen-borders column
    • give them all dotted green lef
    • give them all dotted bottom green border
      • use the :last to remove the undesired bottom border from the last element

    You can find all rows in that column by doing something like:

    $(td[class*="greenBorder"]).addClass("green_borders");
    $(td[class*="greenBorder"]).last().css('border-bottom','')
    

    Note im saying something like because im not very good with jQuery and don't have the right syntax/grasp of how selectors are used. But I've seen examples where similar things are done. You can find tonnes of examples of this site, or consult the original documentation (which is kinda bad, imho).

    Ok, I did it:

        
        
        
        
        Green Border
    
        
        
        
        
        
        
    Sport Status Pick Genius Genius Credential Result
    blah
    moo flah glah vlah mlah nlah jlah
    clah dlah xlah
    plah slah klah
    qlah wlah zlah
    blah
    moo flah glah vlah mlah nlah jlah
    clah dlah xlah
    plah slah klah
    qlah wlah zlah

提交回复
热议问题