Forums

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

Home Forums CSS Responsive table pseudo element alignment help

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #210503
    webscot
    Participant

    The article at https://css-tricks.com/responsive-data-tables/ was quite helpful in creating responsive tables.

    However, some responsive tables have a long enough string that more than one line is required to display the cell contents. Once the content of each cell enters the second line, it sits below the content of the pseudo element (:before).

    How can I use CSS to cause all of the cell’s content to be displayed to the right of the pseudo element as if in a columnar fashion?

    I have tried several things to no avail.

    #210504
    Beverleyh
    Participant

    Not sure what you’re referring to. Can you set up a reduced example in CodePen so we can more easily see the problem?

    #210505
    webscot
    Participant

    Thanks Beverleyh,

    I believe this will clarify. Please let me know if there is any issue viewing it.

    http://codepen.io/anon/pen/dYjgGz

    #210506
    webscot
    Participant

    Of course anon pens can’t be embedded. :)

    OK, let’s try this one.
    http://codepen.io/webscot/pen/avjRZm

    #210507
    webscot
    Participant

    I don’t want the Product string to hit a line break and run under the :before content, “Product.” I want it to line break and start at the same point where line one of the cell content begins.

    #210510
    Beverleyh
    Participant
    #210512
    webscot
    Participant

    Thank you so much. That works perfectly! I think you should write an article. I’m sure I’m not the only one that could use this solution.

    #210513
    Beverleyh
    Participant

    Great idea – I might just do that :D

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