Re: How to set Table width

Home \ forums/reply \ Re: How to set Table width
#1837
Michael Gilkes
Keymaster

@Ron. As per your request… below is the email I sent to you several times:

========================

Hi Ron,

Ok… here is the run down.

If you check the DOM as well as the style sheets you will see that width of the table is not set to 100%. It is set to “inherit” (See for reference: http://www.w3.org/TR/CSS2/about.html#inherited-prop). Normally, this means that the width would be inherited from the parent element.

When multi-download is disabled, the parent element is the containing div of class art-postcontent. To be honest, since the width of that div is 854px, the table should be the same. I am not sure why it is 280px instead. However, when the multi-download is enabled, I engulf the table in a form element. So, the table inherits the width of the form, which is 854px.

So, it is not that the multi-download feature is changing the width of the table, in strict terms. None of the code is actually doing this. You have to realize that the “cascading” feature of CSS causes these types of artifacts.

You can easily verify everything that I said by right clicking on the table and selecting “Inspect Element”, and you will see what I am saying in the browser’s console. I have attached 2 screenshots for you to reference.

Understanding this is one thing…. however, you can force the width of the table by editing the styles.css file located in media/advlisting/css folder. You can change it from width: inherit; to width:100% if you want.

Hope this helps,

Michael

PS. I removed the attachments. Here are the links:

http://s793.photobucket.com/user/michaelgilkes/media/Business%20Screenshots/ScreenShot2014-03-10at80946PM.png.html

http://s793.photobucket.com/user/michaelgilkes/media/Business%20Screenshots/ScreenShot2014-03-10at80956PM.png.html