Comments (2)
aaah.. yes, actually I remember having realized before, in the past, that the amount it sticks out is exactly the height of the title..
100% means the full height of the parent, not just available space.
Yes, in fact I did mention that I expected the element to stretch to fit the container (or "parent").
The problem is that the container is just the slide, and not the slide "minus" the title... (stupid me)
The only solution that seems to do what I want, is a flex container:
CSS
.title-content {
height: 100%;
display: flex;
flex-direction: column;
}
.title-content > div {
flex: auto;
}
HTML
<section class="slide">
<div class="title-content">
<h2>Title 2</h2>
<div>
This div will fill the available vertical space
</div>
</div>
</section>
Anything deeply wrong with this?
It's easier to style images in fixed units, keeping in mind that the slide's height is 1024 by 576.
yes, it is easier, but I was aiming to avoid hardcoded sizes for more flexibility.
Thanks for the fast reply!
from shower.
Hello! Yes, you're missing the way height: 100% works in CSS. 100% means the full height of the parent, not just available space. It means that it sticks out of the slide exactly by the height of the title.
I'd suggest looking a the examples in the theme's index file: cover and place primitives.
It's easier to style images in fixed units, keeping in mind that the slide's height is 1024 by 576.
from shower.
Related Issues (20)
- Add option to disable history state change on modechange HOT 9
- Please add navigate mouse. HOT 5
- Wait until the slide change before closing next sequence
- shower on mobile HOT 4
- Is this compatible with pandoc? HOT 1
- Ribbon theme. Name of the colors HOT 3
- Wrong default name of the PDF file in .gitignore file HOT 2
- Generate themeโs screen shots via script
- Auto-rotate for full screen on mobile
- <mark class="important"> tag inside <code class="mark"> is not working
- "shower create" is not working HOT 1
- missing docs/index.html HOT 1
- Accessibility: aria-relevant causes too much speech
- Hide cursor after 5 seconds of non-movement for a presentation mode HOT 3
- Calculations for shower body can be simplifed HOT 3
- JoyCons Support HOT 3
- Drawing on top of slide
- The last slide is not the last
- npm run bundled works incorrect with self-closed tag <link .../> HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shower.