Search the Community
Showing results for tags 'margin-top'.
-
I have a question about margin-top. I made a css script with span columns. The higher columns are supposed to push the lower ones down. I place them in a div, in here multiple columns. The second column though, takes the top of the outer div as reference (not sure if that tis called parent). I find this strange. I tried to make a second div inside but it didnt work. Can you only use div as a reference point or also a span element or p ?
- 9 replies
-
- css
- margin-top
-
(and 3 more)
Tagged with:
-
I have an app for scheduling for out homeschooling. I use floating divs to represent various events in a column for each child and for each day. I found that I can set the height of each div such that one hour is 5.55% of the total height of the containing div. style="height:5.55%;" So I thought to represent the time between events using margin-top. So 30 minutes of free time could be represented this way: style="height:5.55%;margin-top:2.78%" But margin-top is calculated based on the width of the element. I was surprised by this inconsistency. The logic which determines that an element's height should be calculated based on the height of the containing element should also be applied to margin-top. Does this make sense? And how would one propose a change to the calculation of margin-top based on percent? Can it even be changed?
- 1 reply
-
- margin-top
- css
-
(and 1 more)
Tagged with:
-
Hello, I'm using a stylesheet version 1.0.I'm setting the attribute margin-top within the following:<fo:simple-page-master> <fo:region-body> <xsl:choose> <xsl:when test="blah blah <xsl:attribute name=margin-top"> <xsl:value-of select="blah blah" The margin-top can contain from 3-10 (which is the number of lines that can be printed in the heading section of the PDF) and the <xsl:choose> has multiple combinations of tests. I now have to add an additional optional heading line which will increase the multiple combinations of test resulting in an already clumsy method being more clumsy. I was thinking of creating a template that added one to a separate variable for each of the tests above. Then I can set the final variable for the heading row count by adding these variables resulting in a value of between 3-11. I now want to set the margin-top attribute of the<fo:region-body> with this value. I don't know if this is possible and where I would call the template.I would like to set the margin-top within this new template but am not sure how to do this. Any help will be greatly appreciated! Thanks,Rita