Resize cells for vertical text | Formidable Plus | Forum

This forum requires Javascript to be enabled for posting content

 

Current User: Guest
Login
Members
Please consider registering

Lost Your Password?

Search Forums:

 










Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Resize cells for vertical text

Reply to Post
Add a New Topic
User Post

3:34 pm
May 7, 2012

JohnPrusinski

Member

posts 13

Hi, I used your suggestion to use CSS to make text run vertically in the column headings; I'm having trouble getting the column heading cells to size to the text, however… they're too tall and run over the top edge of the table.  I've checked the forum, and tried editing my style.css file to include 

#frm-table-294 .column-1 input{
    width:20px;
    height:200px;
}
 
but it's not working, so far... any suggestions?

10:53 pm
May 7, 2012

JohnPrusinski

Member

posts 13

I just wanted to update this to say that I originally tested it by putting the entire CSS style into the table cell, which works, but obviously it would be better to put the code into my style.css and just call the class in the table cell.  So I put the code into style.css, and tested the formatting on a page on my site, and it works well.  This is the basic format:

 

<p class=”css-vertical-text”>Making a Clear Request</p>

 

But if I put that into the table cell, it doesn't work; could it be that something in the table code is preventing the call to the class?  If someone has time to look at the main issue (resizing the column header cells to fit the vertical text), maybe you could think of a solution to this at the same time?

Thanks!

 

btw, this is the CSS that's now living in my style.css file:

p.css-vertical-text {
	color:#000;
	border:0px solid red;
	writing-mode:tb-rl;
	-webkit-transform:rotate(270deg);
	-moz-transform:rotate(270deg);
	-o-transform: rotate(270deg);
	white-space:nowrap;
	display:block;
	bottom:0;
	width:20px;
	height:20px;
	font-family: 'Arial', Helvetica, sans-serif;
	font-size:10px;
	font-weight:normal;
}

9:39 am
May 8, 2012

Top Quark

Barrie, ON

Member

posts 179

Post edited 9:39 am – May 8, 2012 by Top Quark


Hi John,

I would try using the CSS selector:

 
#frm-table-294 thead th{
	color:#000;
	border:0px solid red;
	writing-mode:tb-rl;
	-webkit-transform:rotate(270deg);
	-moz-transform:rotate(270deg);
	-o-transform: rotate(270deg);
	white-space:nowrap;
	display:block;
	bottom:0;
	width:20px;
	height:20px;
	font-family: 'Arial', Helvetica, sans-serif;
	font-size:10px;
	font-weight:normal;
}

 You’re trying to affect the column headers right?  

I think you’ll need to change the height style to something like height:200px.  

Is your table live somewhere that I could see it?  

Cheers
Trevor 

10:27 am
May 8, 2012

JohnPrusinski

Member

posts 13

Thanks, we're getting closer!  This is now putting the text, aligned vertically, into the column header.  However, it puts every column header into the first column, on top of each other.  What I'm trying to do is create a chart for instructors to input student grades in various areas of study.  What I'm going to want is for the first column to have text fields for student names, 10 or 12 characters wide, and subsequent columns  (there will be around 20 of them) to have the names of the area of study vertically in the column head, with the cells below them just wide enough to accept a 2-character input text field.

 

You can see the table I'm trying to construct at the bottom of the form here:  http://ecbiz119.inmotionhosting.com/~nappit5/test/

 

I also inserted a scan of the print chart I'm trying to replicate, below the form, so you can see what I need to accomplish.

 

Thanks!

10:30 am
May 10, 2012

Top Quark

Barrie, ON

Member

posts 179

Hi John,

Can you try taking out the display:block within that CSS declaration?  

Trevor

2:30 pm
May 10, 2012

JohnPrusinski

Member

posts 13

Thanks, Trevor, that helps a lot.  This is what I have in there now, which is working well:

 #frm-table-360 thead th{
 color:#000;
 writing-mode:tb-rl;
 -webkit-transform:rotate(270deg);
 -moz-transform:rotate(270deg);
 -o-transform: rotate(270deg);
 white-space:nowrap;
 bottom:0;
 width:20px;
 height:155px;
 font-family: 'Arial', Helvetica, sans-serif;
 font-size:10px;
 font-weight:normal;
 border:solid 1px;
 text-align:center;
 vertical-align:middle;
 padding:0px;
 }
 
The one last thing I need, in order to get this working perfectly, is control over the column widths 
(10-12 character input fields for the Name column, 2-character input fields for the rest of them).
 
Any suggestions on how to accomplish that (and btw, excellent tech support! I really appreciate it.)
 

2:40 pm
May 10, 2012

JohnPrusinski

Member

posts 13

Doh!  Never mind, I just checked the other threads in this forum and found:

 }
 #frm-table-360 .column-1 input{
    width:20px;
}
 
which takes care of that nicely.  I'm going to have over 20 columns in this, however... 
do you know of a way to set column widths 1 though 20+ to be 20px all in one selector, 
or should I just define each one?  Not that big of an issue, but I'm sure there's a slight
performance hit if I can't figure a way to do them all (except column-0) at once...
 
Thanks again...
 

3:46 pm
May 10, 2012

JohnPrusinski

Member

posts 13

Continuing… I now realize that setting column-1 input just sets the width of the input field; the column widths are sort of unaffected.  Or rather, unpredictably unaffected.  I put in all 23 of them, and some of them are the correct width, some of them remain far too wide, more or less at random, as far as I can tell.  I've checked all the selectors, and they're all identical, other than the column number specification.

Any suggestions as to how to consistently make columns 1 through 23 exactly 25 pixels wide (allowing a little extra space, since the input field seems to need about 23 pixels to fit two upper case letters in it)?

 

Thanks!

 

(oh, and btw, every time I try to post in the forum, it asks me to log in again, and pretty consistently tells me I have the wrong password.  I reset my password, log in, and then the next time it tells me I have the wrong password again… since I've been doing it two or three times a day, as you can tell(!), I know my password pretty well by now, so there seems to be something amiss with the registration/login process… or is it only me that's having this problem?)

4:21 pm
May 10, 2012

JohnPrusinski

Member

posts 13

Also, I updated the form at http://ecbiz119.inmotionhosting.com/~nappit5/test/ so that you can see what it looks like now; because I'm mirroring the form I'm creating on the real site, you now have to choose the “SMART” radio button for Certification Level in the form to see the table at the bottom…

5:02 pm
May 10, 2012

JohnPrusinski

Member

posts 13

Post edited 9:27 pm – May 10, 2012 by Top Quark


More updating:  I’m on a heavy deadline here, so every time I feel like I’ve reached a dead end, I come back here to ask the question, then go back and try again to figure it out for myself!

 

The latest:  I added 

.frm-table {
	table-layout:fixed;
	 width:100%;
 }

which is keeping the table cells the right width, but has introduced two new problems: first of all, the labels are now too high in their cells, and are running out of the table. I can’t figure out which parameter will move them down, even though I keep trying different methods. Also, the first column is blank… I can’t figure out why that is. It would help if I could use it, because now the Name column is the same narrow width as all the rest, which makes sense since the table is fitting itself into the page width, but it would be good if it was at least as wide as two of the other columns… so it’s a shame to waste that first, empty column. Thanks.

9:31 pm
May 10, 2012

Top Quark

Barrie, ON

Member

posts 179

Hi John,

Ah the joys of working outside the box!

I can't access the form on the URL that you sent me.  It says I don't have permission.

The login thing on my site here is a problem with the synchronization between the WordPress user database and my membership user database.  The membership one is the master for passwords.  If you want to change passwords, login using the login form in the footer of this website (don't use the Login one on the forum here).  You can then update your password on the membership page.  

Cheers
Trevor 

10:54 pm
May 10, 2012

JohnPrusinski

Member

posts 13

Oh, sorry, the actual site has all these levels of membership, and rather than try to negotiate you through that I've been trying to keep a duplicate of the form outside the member area.  But I forgot the last time I duplicated it to change the membership requirements…

 

Anyway, if you have a chance to take a look, the url http://ecbiz119.inmotionhosting.com/~nappit5/test/ should work for you now.

 

And thanks for the hint about the login/password!

 

John.

10:14 am
May 11, 2012

Top Quark

Barrie, ON

Member

posts 179

Hi John,

This is turning out to be way trickier than I thought it would be – and rightly more than it should be.  Alas.

Try adding the following to the CSS for the table (#frm-table-360 thead th):

 position:relative;
 top:60px;

That gets it looking good for me in Chrome. How does it look in Internet Explorer?

Given the difficulty with this, it might actually be worthwhile considering the “text as image” solution you mentioned at the very beginning – create an image with each of the titles in it and then set that up as a background image.  I would suggest creating a single image with all of the titles in it, spaced apart by, say, 60 px.  Then, setup a general CSS declaration for the header elements like:

#frm-table-360 thead th{
    overflow:hidden;
    text-indent:-10000px; // This and the hidden items are a trick to make the text content not show
    background:url(images/all-the-titles.png) 0 0 no-repeat;
}

Then, for each individual header, you'll adjust the background position:

#frm-table-393 th.column-0{
    background-position:-120px 0;
}

Likely some more CSS tweaking, but this could get you started and to the solution faster than this “rotating text” approach.

Cheers
Trevor 

1:24 pm
May 11, 2012

JohnPrusinski

Member

posts 13

Trevor, if I may say so, you are a rock star.  We're 98% of the way there!  In fact, at this point, it's just a little tweaking…  

If you take a look at http://ecbiz119.inmotionhosting.com/~nappit5/test/ you'll see that everything looks pretty much as it should; I ended up doing each header cell with an individual background, because trying to position one graphic for all of them was causing issues across browsers.  This one is a little less efficient because of having to load all those small labels, but it works fine in every browser I tested (a little funky with the input fields overlapping the cell borders slightly in some cases, but it's basically fine).

The last issue is that first blank column; it's a limitation of my knowledge that I don't understand why it's there, I would have thought column-0 would be the first one.  It wouldn't even matter, except that horizontal space is at such a premium in this table that it would help greatly if I could eliminate the blank column and distribute the regained horizontal space across the rest of the columns.

Any thoughts?

Thanks!

1:55 pm
May 11, 2012

Top Quark

Barrie, ON

Member

posts 179

Hi John,

I would turn it into a dynamic table.  Delete all of the rows in the Formidable editor.  Then, when the table renders, it will be dynamic – allowing the person filling out the form to add as many rows as they want.  That will eliminate the first column as well.

Cheers
Trevor

2:44 pm
May 11, 2012

JohnPrusinski

Member

posts 13

Excellent!  It's all good.  One last (minor) thing… is it possible to remove the “delete row” column?  I don't mind if users end up with too many rows, and it would be nice to reclaim that space, too.

 

Thanks so much…

8:09 pm
May 11, 2012

JohnPrusinski

Member

posts 13

Oh, and a follow-up: I had forgotten that making the column headers background images meant wouldn't be printable, which is a problem, since my client insists that the forms must be printable, and it's tough to make sense of the table without the column headers showing up.  I tried a bunch of different tactics, and nothing quite worked, until on a whim I just pasted the html image tags into the input fields in the Formidable Plus table builder… and it worked great!

 

Sometimes things are simpler than they seem…

 

Cool

1:37 pm
May 14, 2012

Top Quark

Barrie, ON

Member

posts 179

Nice work!!  

So many times I've spent huge time on complicated solutions only to end up coming back to a simple solution.  Simple and elegant is always the goal.

Cheers
Trevor 

2:05 pm
May 14, 2012

JohnPrusinski

Member

posts 13

Thanks, I couldn't have gotten here without your help… if you ever need a recommendation, let me know!

10:24 pm
May 14, 2012

Top Quark

Barrie, ON

Member

posts 179

Thanks John.

Reply to Post

Reply to Topic:
Resize cells for vertical text

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused
Cool
Cry
Embarassed
Frown
Kiss
Laugh
Smile
Surprised
Wink
Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
7 + 1
   

© Simple:Press