Table Margins / Border

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
Ionut Bocanet
Posts: 28
Joined: 2017-03-12 09:26
Contact:

Table Margins / Border

Post by Ionut Bocanet » 2019-09-16 11:46

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.
Attachments
example.png
example.png (87.36 KiB) Viewed 2443 times
Best Regards,
Ionut Bocanet

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Table Margins / Border

Post by pbottcher » 2019-09-16 13:29

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>
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Ionut Bocanet
Posts: 28
Joined: 2017-03-12 09:26
Contact:

Re: Table Margins / Border

Post by Ionut Bocanet » 2019-09-17 07:30

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.
Attachments
example 2.png
example 2.png (231.32 KiB) Viewed 2416 times
Best Regards,
Ionut Bocanet

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Table Margins / Border

Post by pbottcher » 2019-09-17 09:52

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.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

federico
Veteran Member
Posts: 74
Joined: 2020-10-29 14:52

Re: Table Margins / Border

Post by federico » 2024-02-04 15:28

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?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Table Margins / Border

Post by jsetzer » 2024-02-05 08:31

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 296 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.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply