Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

(FFG Star Wars RPG) CSSGrid Help With New Sheet pt.2

Hi all, So ran into another two issues designing this sheet and I can't for the life of me figure them out.&nbsp; See image below: 1) The first issue is I am trying to center the white text into the blue hexagon.&nbsp; But no matter what I try it will not move down to center.&nbsp; I've tried border, padding and margin to no luck.&nbsp; I am wondering if it is running into the border/padding/margin of the input box?&nbsp; But even adjusting that I've had no luck. 2) Notice how large the input box is?&nbsp; I cannot get it to resize smaller or to a two-digit number size. *Sorry for the blurry image, its a screenshot of a screenshot to be able to see the input box. Here is the relevant html: &lt;div class="stats section"&gt; &lt;div class="soak-box"&gt; &lt;span class="stat-text-soak-head"&gt;SOAK&lt;/span&gt; &lt;input class="soak-stat" type="number" name="attr_soak" max="20" min="-5" value="0"&gt; &lt;/div&gt; &lt;div class="threshold-box"&gt; &lt;span class="stat-text-head"&gt;WOUNDS&lt;/span&gt; &lt;input class="wound-threshold-stat" type="number" name="attr_wound_threshold" max="60" min="-60" value="0"&gt; &lt;input class="wound-current-stat" type="number" name="attr_wound_current" max="60" min="-60" value="0"&gt; &lt;span class="stat-text-foot"&gt;Threshold&lt;/span&gt; &lt;span class="stat-text-foot"&gt;Current&lt;/span&gt; &lt;/div&gt; &lt;div class="threshold-box"&gt; &lt;span class="stat-text-head"&gt;STRAIN&lt;/span&gt; &lt;input class="strain-threshold-stat" type="number" name="attr_strain_threshold" max="60" min="-60" value="0"&gt; &lt;input class="strain-current-stat" type="number" name="attr_strain_current" max="60" min="-60" value="0"&gt; &lt;span class="stat-text-foot"&gt;Threshold&lt;/span&gt; &lt;span class="stat-text-foot"&gt;Current&lt;/span&gt; &lt;/div&gt; &lt;div class="threshold-box"&gt; &lt;span class="stat-text-head"&gt;DEFENSE&lt;/span&gt; &lt;input class="defense-ranged-stat" type="number" name="attr_ranged_def" max="4" min="0" value="0"&gt; &lt;input class="defense-melee-stat" type="number" name="attr_melee_def" max="4" min="0" value="0"&gt; &lt;span class="stat-text-foot"&gt;Threshold&lt;/span&gt; &lt;span class="stat-text-foot"&gt;Current&lt;/span&gt; &lt;/div&gt; &lt;div class="threshold-box"&gt; &lt;span class="stat-text-force-head"&gt;FORCE&lt;/span&gt; &lt;input class="force-threshold-stat" type="number" name="attr_force_threshold" max="10" min="0" value="0"&gt; &lt;input class="force-current-stat" type="number" name="attr_force_current" max="10" min="0" value="0"&gt; &lt;span class="stat-text-foot"&gt;Threshold&lt;/span&gt; &lt;span class="stat-text-foot"&gt;Current&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; Here is the relevant CSS: .sheet-stats { grid-area: stats; background-color: #72cddc; display: inline-grid; grid-template-columns: repeat(5, 1fr); } .sheet-soak-box { background-image: url(<a href="https://github.com/InquisitorTremayne/FFG-SWRPG-R20-Sheet/blob/master/images/soak_box_small.png?raw=true" rel="nofollow">https://github.com/InquisitorTremayne/FFG-SWRPG-R20-Sheet/blob/master/images/soak_box_small.png?raw=true</a>); background-position: left; background-repeat: no-repeat; padding: none; } .sheet-threshold-box { background-image: url(<a href="https://github.com/InquisitorTremayne/FFG-SWRPG-R20-Sheet/blob/master/images/threshold_box_small.png?raw=true" rel="nofollow">https://github.com/InquisitorTremayne/FFG-SWRPG-R20-Sheet/blob/master/images/threshold_box_small.png?raw=true</a>); background-position: left; background-repeat: no-repeat; padding: none; } input.sheet-soak-stat, input.sheet-wound-threshold-stat, input.sheet-wound-current-stat, input.sheet-strain-threshold-stat, input.sheet-strain-current-stat, input.sheet-defense-ranged-stat, input.sheet-defense-melee-stat, input.sheet-force-threshold-stat, input.sheet-force-current-stat { display: inline-grid; font-weight: bold; font-size: 15pt; margin-top: 5px; border: 1px transparent; background-color: transparent; } input.sheet-soak-stat { margin-left: 40px; text-align: center; } input.sheet-wound-threshold-stat, input.sheet-strain-threshold-stat, input.sheet-defense-ranged-stat, input.sheet-force-threshold-stat { text-align: right; } input.sheet-wound-current-stat, input.sheet-strain-current-stat, input.sheet-defense-melee-stat, input.sheet-force-current-stat { text-align: left; } span.sheet-stat-text-head { margin-top: 1em; margin-left: 3em; margin-bottom: none; font-weight: bold; color: #FFFFFF; } span.sheet-stat-text-soak-head { margin-top: 1em; margin-left: 48px; font-weight: bold; color: #FFFFFF; } span.sheet-stat-text-force-head { margin-top: 1em; margin-left: 45px; font-weight: bold; color: #FFFFFF; } Could it be the in-line grid for the inputs?&nbsp; I just happened to get lucky putting that in-line there and they almost automatically centered to where I wanted them so I left it! :D Thoughts? Thanks
1595397611
GiGs
Pro
Sheet Author
API Scripter
It looks like you're missing some relevant CSS, because this is what that html and CSS looks like in an otherwise empty sheet So something else might be interfering. I'm curious though about wht soak/wounds/defense are at a different vertical position to strain and force. I dont see what is causing that (I'm definitely no CSS expert).&nbsp; The display:inline-grid &nbsp;doesnt appear to do anything here. If removed, the display looks identical.
It's missing the relevant grid area, I think... .sheet-main { display: grid; width: 800px; height: 900px; grid-gap: 4px; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: 25px 100px 30px 80px 60px 1fr 100px 100px; grid-template-areas:"info info infor infor" "dice dice char char" "init init tabs tabs" "stats stats stats stats" "attri attri attri attri" "skill skill skills skills" "weapon weapon weapon weapon" "talent talent power power"; } I'm VERY new to all this and learning as I go, so, no expertise here either!