I hope somebody can help me with this, I have been beating my brains out for hours. I have some html that in the header is supposed to put the character name on the left, with a label under it, both of them taking no more than 30% of the available space, and the player name on the right with a label under it, also taking 30% of the space. With the logo in the center. <div class="sheet-header">
<img src="<a href="https://s3.amazonaws.com/files.d20.io/images/30109476/I1Rgkg1T5552Yp9Zs0Jm6Q/max.jpg?1489432634" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/30109476/I1Rgkg1T5552Yp9Zs0Jm6Q/max.jpg?1489432634</a>" style="position:absolute; top:40px; left:35%; width:200px; height:75px; max-width: 30%;" alt="Earthdawn 4th edition RPG Character Sheet" />
<span class="sheet-w30 sheet-label">
<input name="attr_character_name" type="text" title="@{character_name} Full name of character." placeholder="Character Full Name">Character Name
</span>
<span class="sheet-w30 sheet-label sheet-floatRight">
<input name="attr_player-name" type="text" title="@{player-name}" placeholder="Player Name">Player Name
</span>
</div>
What I am getting is the first input (the character name) taking the entire top row, the label below, it, then the text of the player name sharing the row with the character label, and the player label below it. So basically, the character name should be shorter, and the player name should be up one line. Here is the relevant CSS. .sheet-floatRight {
float: right;
}
.sheet-label {
font-weight: bold;
text-align: center;
color: #000;
}
input[type="text"],
select {
width: 100%;
margin: 0;
}
.sheet-w30 {
text-align: left;
width: 30%;
}
So the way I see it, the spans that wrap the inputs and the labels ought to limit themselves to 30% of the width of the header. I would expect the text input to be 100% of the width OF THE SPAN, ie: 30% of the width of the spans container. However, here is what the inspector finds. This is the first Span Notice that the very first cascading style says width 30%. However for some reason the width is somehow set to "auto" and is taking up the whole width of the header. The width of the text input inside of it is as follows And as you can see the first span is setting itself to 714 px width, which is 100% of the width of the header that contains the span that it is in. Another funny thing is that the other span and text input and label, which looks exactly like it except that it also has a sheet-floatRight is behaving properly and limiting itself to the 30% of the screen it is supposed to be in. I have tried several things, and I simply can't get the first span to limit itself to it's correct length. Why is it growing so huge? How do I keep it down to 30% of the line? Thank you.