Page 1 of 1

Table Margins / Border

Posted: 2019-09-16 11:46
by Ionut Bocanet
Dear colleagues,

First of all sorry if this topic already was discussed. I tried to find it but without any success.

I want to minimize the unused margins/borders in the application.

Is there a easy way to do this?

I want to do this to have more space for the data.

I attached an image to be easier to be understood.

Re: Table Margins / Border

Posted: 2019-09-16 13:29
by pbottcher
Hi,

from the screenshot I assume you want to get more space on the children tabs.

You can try to use (either add it via the hooks/TABLENAME_dv.php, or via the hooks/TABLENAME-dv.js or even via the hooks/footer-extras.php)
Make sure you wait till the Child entries are created, otherwise it will fail.

Code: Select all

<script>
$j(function() {
	$j("[id*='-children']").parent().removeClass();
});
</script>

Re: Table Margins / Border

Posted: 2019-09-17 07:30
by Ionut Bocanet
Yes, i want more space for the data. I put the code in footer-extras.php and worked perfectly to the Child Table. Thank you so much; Greatly appreciated.

I would want also to decrease the margin 'x' also from Parent. See attached. It is possible of course.

Re: Table Margins / Border

Posted: 2019-09-17 09:52
by pbottcher
Hi,

you can change that in the dynamics.css. Edit line

@media (min-width: 768px){ .container{ width: 90% !important; } }

and put instead of 90% e.g. 98%.

Remember that the file will be overwritten once you regenerate your project.

Re: Table Margins / Border

Posted: 2024-02-04 15:28
by federico
Hi
is there any other way to change the css file from hook folder maybe?
Is there also a way to reduce the space at the top?

Re: Table Margins / Border

Posted: 2024-02-05 08:31
by jsetzer
is there any other way to change the css file from hook folder maybe?
(1) Did you try to put CSS in hooks/header-extras.php?

header-extras.php

Code: Select all

<!-- file: hooks/header-extras.php -->
<style>
    /* YOUR CSS DEFINITIONS HERE */
    .container,
    .container-fluid {
        outline: 2px dashed slateblue;
        margin-bottom: 15px;
    }
</style>
y7sju7cUpG.png
y7sju7cUpG.png (57.61 KiB) Viewed 304 times
---

(2) Alternatively, you can create your own custom CSS file and include it as stylesheet in hooks/header-extras.php. That's the way I usually do it for separating HTML, code and styles.

header-extras.php

Code: Select all

<!-- file: hooks/header-extras.php -->
<link rel="stylesheet" href="hooks/header-extras.css">
Please note, that in header-extras.php we include header-extras.css

header-extras.css

Code: Select all

/* file: hooks/header-extras.css */
.container,
.container-fluid {
    outline: 2px dashed slateblue;
    margin-bottom: 15px;
}
Note, that we don't need any <style>...</style>-tag in CSS file (because browser already knows that we are including CSS).

(3) Don't forget to clear cache when reloading browser after CSS and JS changes. Otherwise the browser may use locally stored (=cached) resources instead of loading latest version from server.