Jason Bourne
Jason Bourne

Reputation: 97

Changing the width of Cards Oracle APEX

I'm currently trying to get an APEX cards region to serve as a vertical region display selector. The idea was to generate cards using the "Horizontal (Row)" layout options and use icons as identifiers since text wouldn't fit, then call some javascript when you click the cards to change a region display selector.

Currently I can't get the cards to be the exact width that I want using a span of 1 columns is too skinny on a drawer page, and 2 columns is too wide, it appears I need the width of my cards to be perfectly between these two limits.

Just to the right of my cards region there will be other regions that the user will be cycling through so I would like there to still be the normal amount of space between these two regions.

Any help would be greatly appreciated!

Upvotes: 1

Views: 449

Answers (2)

Jason Bourne
Jason Bourne

Reputation: 97

In my case, adding style="width:70px" to the custom attributes field in my cards region did the trick for me, keep in mind that this solution is a bit finaky and can cause regions to overlap.

Upvotes: 0

Koen Lostrie
Koen Lostrie

Reputation: 18630

a cards region is just a type of report, it's not meant to be used for navigation but to display the information optimally to the user. A list region on the other hand is better suited for navigation. Have a look at the different list templates to see if there is one that you can use in a drawer (check the list components in the universal theme app). There is a cards list template but that could give the same issue you are having now with columns. Links list might be an alternative for your case.

This is just an opinion - do with it what you want. Typically I try to go for the out of the box solution with as little changes as possible. That is faster to implement and easier to maintain going forward.

Upvotes: 0

Related Questions