Zurb Ink's grid requires a table.container element at the top-most level to contain rows and columns. However, it's not clear to me if there should only be one table.container for the whole email – kind of like a <body> tag. Or is it is better practice to have multiple containers, one for each section?
table.container {
margin: 0 auto;
text-align: inherit;
width: 580px;
}
Look at the CSS code for table.container It is used to create a fixed width layout which centers the content.
Now coming to your question, Look in the documentation for Reverse Row Syntax. It is a indication that tells you that you can use multiple containers if you need to restrict the full width row.
If you have a fixed width layout throughout, use table.container at
the top.
If you have variable length elements, use table.container at each
section if you want to restrict the width for the content.
Related
can anyone help me? I would like to show Custom Image (the images uploaded in static file ) in the List. I've already tried it in the by (shared components/list/(Image/Class) /#APP_IMAGES#ad.png)
but that not working fine , how i can do that in below list or how i can add new icon in icon file ?
please any advise .
The following steps were tested on APEX 19.2.
Resize your image to 16px square. The CSS used to add the image will not allow the image to be resized via CSS, so this needs to be done ahead of time. You could choose a different image size, but that would require adjusting other aspects of the menu. See the notes at the bottom about this if needed.
Upload the image to the Shared Components and get the URL from the Reference column in the report. You can use either Static Application Files or Static Workspace Files depending on your needs. I used Static Application Files and the URL was: #APP_IMAGES#dm-16.jpg
Go to Shared Components > Lists. Select the list you'd like to work with and then drill down into the list entry where you'd like to display the image. In the Image/Class field, add a custom class that you can use to target the element. I used: dm-16
Go to the page where you have the button setup to open the menu. If you don't already have this setup, you can use this as a guide. Go into the page-level attributes and add the following CSS to the Inline filed in the CSS section:
.dm-16:before {
content: url(#APP_IMAGES#dm-16.jpg);
}
The CSS is selecting the class from step 3 and setting the content attribute using the value from step 2.
When you run the page you should see something like this:
Here are some notes about using larger images... There's a span that wraps the span with the image and has a class named a-Menu-statusCol. That element has its width attribute set to 32px. This is because its left and right padding are set to 8px each (16px total) so when you add the image at 16px the total width becomes 32px.
Let's say you want to use an image that's 32px wide. You'd need to take the padding (16px) and add the width of the image (32px) and set the span's width to that total. In my example that was 48px. I added the following CSS to the same inline attribute in the page:
.a-Menu-content .a-Menu-statusCol {
width: 48px
}
After that, you'll see that the image doesn't align correctly with the text anymore. This is because the text is in an 'a' element that has its line-height set according to the previous image size. Again, the height is being driven by the span with a class named a-Menu-statusCol. It has top and bottom padding of 10px each (20px total). If you add the default image height (16px) the total comes to 36px, which is what the line-height of the 'a' element is set to. If you add an image with a height of 32px, you'll need to add 20px to that to get a total of 52px. I set the 'a' elements light-height to that value with the following CSS on the same page:
.a-Menu .a-Menu-item {
line-height: 52px;
}
As you can see, the image is now bigger. It doesn't line up with the icon below it as I've not added a larger image to that list entry.
I have an Interactive Report in Oracle APEX 5.1, i have several columns which i want to Hide but allow the end user to search for a text within the hidden column(s).
I have pasted below in the "Function and Global Variable Declaration" section of JavaScript for the page that contains the interactive report -
function hideColumn(id) {
$(id).remove();
}
and below in the "Execute when Page Loads" section -
hideColumn('#static-id-of-column-to-hide');
But this hides the column header ONLY, the data for the respective column is still visible. The space for the hidden column is taken up by the next column header. Also, i have tried both $(id).remove(); and $(id).hide(); , result is same.
Any suggestion?
You could use CSS instead, where your_report is the Static ID for the region, and YOUR_COL usually comes from the column alias. You can verify this by inspecting the element using the browser tool.
#your_report td[headers="YOUR_COL"]
,#your_report th#YOUR_COL
{
display: none;
}
But you might find the report doesn't always respond as expected, in regard to settling column widths.
If you do go the JS route, you should fire this in a Dynamic Action that's After Refresh of that region, not just on page load.
Try this instead of that. (into page inline CSS) It will fix your trouble with column widths maybe.
.a-IRR tr th:nth-child(X), .a-IRR tr td:nth-child(X) {
display:none;
}
where "X" is the column number what you want to hide.
The following code is not showing table border in apex report.
Declare
Cursor c_Group Is
select DISTINCT
PSGROUP
FROM LOG_PS_STATUS;
Cursor c_Col(p_Group Varchar2) Is
select DISTINCT
SRNO,PSCOLUMN as PSCOLUMN
FROM LOG_PS_STATUS
WHERE PSGROUP =p_Group
ORDER BY SRNO;
Begin
For Rec_d In c_Group Loop
Htp.p('<table border: 1px solid>');
Htp.p('<tr><td colspan=75%><b>' || Rec_d.PSGROUP|| '</b></td></tr>');
Htp.p('<tr>');
For Rec_e In c_Col(Rec_d.PSGROUP) Loop
Htp.p('<td>' || Rec_e.PSCOLUMN|| '</td>');
End Loop;
For Rec_e In c_Col(Rec_d.PSGROUP) Loop
Htp.p('<tr><td>' || Rec_e.srno|| '</td></tr>');
End Loop;
Htp.p('</tr>');
Htp.p('</table>');
End Loop;
End;
Your table displays no border because your HTML is invalid. If you want inline CSS you have to use the style attribute which would contain inline CSS declarations.
style="css-property:css-value;…"
Description
In Cascading Style Sheets (CSS), a key feature is the cascade itself.
In the cascade, styles set at different levels take different levels
of importance, so a style that’s set in a globally linked style sheet
can be overridden by a style for the same class or id that’s included
in an embedded style sheet. The style attribute goes a level further,
to override styles set in linked or embedded style sheets.
However, the use of the style attribute is generally considered to be
a bad practice, as it causes the presentation to become intrinsically
mixed with the content of the document—a practice that’s almost as bad
as using the font element to style text. One way in which you might
use inline styles is to debug CSS display issues (applying the style
at its lowest level in the cascade, and progressively moving higher up
the cascade until the problem is isolated). You should, therefore,
avoid using inline style attributes in your markup.
(Source: http://reference.sitepoint.com/html/core-attributes/style)
However:
why not just make a classic report where you break on the first column (group)?
why not use an IR with control break?
Try to use apex to its fullest instead of htp.p calls - that's avoiding the strength of it: declarative. Consider the possibilities and boundaries of apex first.
I have a form based on a model. I create a modelformset and need to display many (possibly hundreds) of individual form fields on a single page. I need to reduce the input size and am achieving this by using this:
widgets = {
'm1_pf': forms.TextInput(attrs={'size':1}),
}
However, this smallest size of 1 is still too big. Is there some other way of accomplishing a data-grid like presentation?
I have looked at using a Datatable with "editable cells" but this will not work for my situation. I need to be able to enter several values quickly by entering the first value, hitting tab, entering the next value, hitting tab, etc. Using the mouse to "click" into each cell and edit it (as is how Datatables works) is out of the question.
Thanks
Nevermind -- I figured it out. I added this to my CSS sheet:
input {
width: 1px;
}
I am OK with all input tags having this value.
I have two columns in my table with equal width (50%, 50%).
I am showing search results URL in them. For big urls the columns are stretching and destroying the layout.
Any suggestion to the problem?
SEE How to wrap long lines without spaces in HTML?
These may help too:
Best word wrap algorithm?
Word-wrap in an HTML table
You can set text-overflow:ellipsis; described here and/or use jQuery ellipsis plugin.