Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts

    Problem with Padding Nested Tables

    Hey y'all!

    I'm working on a prototype for an interface, but a, having trouble with some of the CSS. Mainly I'm trying to add a "padding:5px;" to the class ".pt-row", but for some reason it's just not working. Is there a collapse padding rule I don't know about?

    Here's the JS Fiddle link if someone could help me kindly.

    http://jsfiddle.net/Ztert/

    PS: That code has to remain as a table. The custom framework I'm doing this mockup for has strict standards, so I kind of have to work with existing code.

  • #2
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Best as I've seen, you can't pad a tr, only td.

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Why are you trying to nest tables? Thast would imply that single entries within the tabular data are themselves tabular data. In the rare instance where that happens it is best to place a reference in the original table and to put that second table separate from the first so as to not make the table to overly complex and difficult to read.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    Why are you trying to nest tables? Thast would imply that single entries within the tabular data are themselves tabular data. In the rare instance where that happens it is best to place a reference in the original table and to put that second table separate from the first so as to not make the table to overly complex and difficult to read.
    The company that I work for has a framework that is already set in placed and used literally world wide. I cannot change that. What I can change however is how they are used. It's not to be read, because no one but a developer will be in the backend.

    This is an html mockup first
    It'll then go into the javascripting phase
    And then it'll go into a dynamic variable replacement phase to be able to talk with their libraries they have implemented.

    This is a fortune 100 company, and they have their restrictions. I couldn't even let you see the original because I'd be fired and face hella fines so...you'll just have to trust me on this lol.

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by Psionicsin View Post
    The company that I work for has a framework that is already set in placed and used literally world wide.
    It probably looks really ugly in those browsers that do not allow table cell borders to be turned off. That being the case there seems little point worrying about browsers applying different padding - since you never have full control over that with tables anyway - which is why transparent gif files were common back when HTML tables used to be used for layout.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #6
    New to the CF scene
    Join Date
    Aug 2013
    Location
    Michigan
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    It probably looks really ugly in those browsers that do not allow table cell borders to be turned off. That being the case there seems little point worrying about browsers applying different padding - since you never have full control over that with tables anyway - which is why transparent gif files were common back when HTML tables used to be used for layout.
    I agree. Using a <table> framework to format the content of your website is a depricated method these days.

    In the long run I would highly suggest that you propose a new site design for your company that you work for. I also feel like there was a lack of an example for this type of problem. If you could post something more with a graphical representation it might be more useful to someone who can help you and see how it's "not working".

  • #7
    Regular Coder Psionicsin's Avatar
    Join Date
    Aug 2010
    Location
    Detroit, Michigan
    Posts
    346
    Thanks
    54
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Big-D View Post
    I agree. Using a <table> framework to format the content of your website is a depricated method these days.
    Ok so I think you guys are misunderstanding what this is. I'm gonna try to clear it up, just in case the wrong idea is floating around. Their CMS is not based on tables, nor does it use tables for content. However the thing I'm linking you to is a mock-up of a tool that already exists in the back-end for in-house web content managers only. This is not something that the public will ever see nor even have access to. All I can do is re-purpose what they already have because it's a vital part of their framework.

    Quote Originally Posted by Big-D View Post
    In the long run I would highly suggest that you propose a new site design for your company that you work for.
    Not gonna happen. Around 16 OEM manufacturers, and 20,000 car dealerships across the world depend on this CMS. They're not going to take the time to completely rewrite something that only we will see and interact with. They've allowed me to create a mock up that adds to/subtracts little from what they already have in place so my idea can be properly implemented.

    Quote Originally Posted by Big-D View Post
    I also feel like there was a lack of an example for this type of problem. If you could post something more with a graphical representation it might be more useful to someone who can help you and see how it's "not working".
    I've attached a Photoshop mock-up for what it will look like in their framework with their colors and stuff. This should help with the explanation I'm about to give.

    • The black trianle button toggles the entry open or closed
    • The green + button adds a new entry
    • The red - button taketh the entry away (except if only 1 exists)
    • Vendor name displays who makes the piece of code
    • Event asks what triggers it
    • Page lets you select the page(s) it's to be applied to
    • Pixel tag is where we will enter code
    • Where asks is the code should be placed in the head or the body upon saving it


    Now with all of that out of the way...my padding solution?
    Attached Thumbnails Attached Thumbnails Problem with Padding Nested Tables-ptag_wsm_mockup.jpg  
    Last edited by Psionicsin; 08-22-2013 at 02:20 PM.


  •  

    Tags for this Thread

    Posting Permissions

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