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

First Attempt at using HTML/CSS. Please help

A few days ago I posted a some html for a character sheet, which was just a coverted PDF which clearly did not work. Since then, I have taught myself HTML and CSS in an attempted to create a functioning character sheet for my own game. I am no designer nor and I a coder, but I gave it my best shot and my results are below. Using very basic code I was able to achieve somewhat of a decent sheet, but I am stumped on a lot of different stuff. 1. I am never sure if my changed to my CSS are working as I never see a change. 2. I can't not get my weapon area to align/float properly 3. I can't change the size of any font I have tried a multitude of different techniques and I just cant get my head around it. Please help me community, your my only hope. The following link is a copy of my PDF sheet just for reference Here <div class="sheet-3colrow"> <div class="sheet-col"> <br /> <br /> <br /> <label>Player:</label><input type="text" name="attr_name"> <label>Name:</label><input type="text" name="attr_name"> <label>Sex:</label><input type="text" name="attr_sex"> <label>Age:</label><input type="number" name="attr_age"> </div> <div class="sheet-col"> <p style="text-align: center;"> <h3 style="text-decoration: underline;">ZARP Character Sheet</h3> </p> <label>Total HP</label><input type="number" name="attr_HP" class="short-sheet"> <label>Current HP</label><input type="number" name="attr_XHP" Class="short-sheet"> <label>Injury</label><input type="text" name="attr_injury" Class="short-sheet"> <label>Effect</label><input type="textarea" name="attr_effect" Class="short-sheet"> </div> <div class="sheet-col"> <br /> <br /> <br /> <label>Background:</label><input type="text" name="attr_background"> <label>Character Description</label><textarea name="attr_Character Description"></textarea> </div> </div> <hr/> <div class="sheet-3colrow"> <div class="sheet-col"> <h3 style="margin-bottom: 10px;">Abilites</h3> <label>Melee</label><input type="number" name='attr_Melee' class='sheet-short'><br /> <label>Ranged</label><input type="number" name='attr_Ranged' class='sheet-short'><br /> <label>Endurance</label><input type="number" name='attr_Endurance' class='sheet-short'><button type='roll' name='roll_ToCheck' value='/roll 1d20 + @{Endurance}'></button><br /> <label>Intelligence</label><input type="number" name='attr_Intelligence' class='sheet-short'><button type='roll' name='roll_ToCheck' value='/roll 1d20 + @{Intelligence}'></button><br /> <label>Luck</label><input type="number" name='attr_Luck' class='sheet-short'><button type='roll' name='roll_ToCheck' value='/roll 1d20 + @{Luck}'></button><br /> </div> <div class="sheet-col"> <h3 style="margin-bottom: 10px">Attributes</h3> <label>Power</label></strong><input type="number" name='attr_Power' class='sheet-short'><br /> <label>Aim</label><input type="number" name='attr_Aim' class='sheet-short'><br /> <label>Medical</label><input type="number" name='attr_Medical' class='sheet-short'><button type='roll' name='roll_ToCheck' value='/roll 1d20 + @{Endurance}'></button><br /> <label>Reflex</label><input type="number" name='attr_Reflex' class='sheet-short'><button type='roll' name='roll_ToCheck' value='/roll 1d20 + @{Intelligence}'></button><br /> <label>Engineering</label><input type="number" name='attr_Engineering' class='sheet-short'><button type='roll' name='roll_ToCheck' value='/roll 1d20 + @{Luck}'></button><br /> </div> <div class="sheet-col"> <h3 style="margin-bottom: 10px">Stats</h3> <label>Stealth</label><input type="number" name='attr_Stealth' class='sheet-short'><button type='roll' name='roll_ToCheck' value='/roll 1d20 + @{Stealth}'></button><br /> <label>Sight</label><input type="number" name='attr_Sight' class='sheet-short'>ft<br /> <label>Sound</label><input type="number" name='attr_Sound' class='sheet-short'>ft<br /> <label>Speed</label><input type="number" name='attr_Speed' class='sheet-short'>ft<br /> <label>Driving/Flying</label><input type="number" name='attr_D' class='sheet-short'><input type="number" name='attr_F' class='sheet-short'><br /> </div> </div> <hr/> <div class="sheet-3colrow"> <div class="sheet-col"> <label>Infection:</label><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><br> <label>Fatigue:</label><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"> </div> <div class="sheet-col"> <label>Melee Weapon</label><input type="text" name='attr_mweapon' class='sheet-short'><label>Weapon damage</label><input type="number" name="attr_Mdamage"> <label>Durability</label><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"><input type="checkbox"> </div> <div class="sheet-col"> <label>Ranged Weapon</label><input type="text" name='attr_rweapon' class='sheet-short'> <label>Weapon damage</label><input type="number" name="attr_rdamage"><button type='roll' name='Ranged Damage' value='/roll 1d20 + @{rdamage} + @{Power}'></button> <label>Clip Size</label><input type="number"> <label>Loaded</label><input type="checkbox"> <label>Shots Fire</label><input type="number"> </div> </div> <hr/> .charsheet label { display: inline-block; width: 75px; text-align: right; } .charsheet input { display: inline-block; width: 165px; } .sheet-col { font-size: 0.5em; font-weight: bold; padding-right: 2px; } .charsheet input.sheet-short { width: 3.5em; } .charsheet table td, .charsheet table th { font-size: 0.5em; font-weight: bold; text-align: center; } select.sheet-dtype { width: 60px; vertical-align: top; }
I am in the middle of something right now. But, if the issue hasn't been fixed by the (many, many) wiser parties here in the next few days (or however long this takes) I will take a look.
I'm a fair beginner at CSS too, and i kind of hate css. It feels like 25 years of hacks that ended up becoming standards, and it takes a thousand lines or more to do even basic layouts that don't look like crap. Your really better off doing some online tutorials on things like the Box Model before you dig to deep into it. Doing basic things like centering something vertically is done different ways than centering something horizontally, for example, and knowing how each element actually lives within other elements is going to key to figuring out which elements you need to target with what rules to get something to look right.
1420151722
Lithl
Pro
Sheet Author
API Scripter
I don't see anything particularly wrong with your CSS, so I don't know why you'd have issues seeing your changes or getting font sizes to work. You are putting the CSS in the CSS tab of the custom sheet, correct?
@Bryan.W Thanks, I have been using alot of tutorials but I will look into the Box Model thing. @Brian That's what has got me so confused. Everything is in the correct place. Although it took me a long time to get any of it to work.
1420160128

Edited 1420160175
<label>Player:</label><input type="text" name="attr_name"> <label>Name:</label><input type="text" name="attr_name"> Well that was interesting... o_0 ... tried pasting the above into the chat window nad got input boxes. Anyway... they have the same name. attr_name
@HoneyBadger Thanks must have missed it along the way. I just noticed that I don't even need the CSS in place and my layout works. I am starting to think that the CSS isn't working at all.
Yep I can now confirm that without the CSS nothing changes. I have even tried just a simple .charsheet { background-color: #9A9A9A; } And it changed nothing
1420169319
Lithl
Pro
Sheet Author
API Scripter
Try getting rid of the .charsheet prefix on your selectors; it's going to be added automatically anyway. I don't believe the system is supposed to add .charsheet if it's already there, but that could be the problem.
1420286254

Edited 1420286341
I have tried so many things to try and figure out what is wrong with my CSS, but alas I have not been able to figure it out. I now believe that my CSS style tab is broken.
There is an entry about the label tag in the wiki. That might be the cause.
Here, try this . Its quick and dirty, without buttons, but the css appears to be working and it mirrors the pdf you gave the link for.
Wow john that is awesome. Thanks heap. I managed to find the problem with the CSS on my PC, turns out Kaspersky safe browsing extension was turned on, I removed it and now everything works perfect. Although I sometimes need to refresh after saving changes.