|
Post by mackrackit on Jan 7, 2008 19:34:49 GMT -5
Hi All,
This RB stuff is fun, but I can not find the answer to this.
I have a text box that I want to have static text to the right of and it needs to be colored with a DIV. I can put it below, no problem. Do I need to use a table to do this? Here is my code:
CSSID #Section1, "{Color: Lime;}"
answer$ = "?" [display]
cls DIV Section1
print "Pythagorean theorem" END DIV textbox #first, first DIV Section1 print "LEG #1"; END DIV print " " textbox #second, second DIV Section1 print "LEG #2"; END DIV print " " DIV Section1 print " Hypotenuse = "; answer$ END DIV print link #add, "CALC", [calc] wait
[calc] gosub [getFields] answer$ = str$(SQR((first*first)+(second*second))) goto [display]
[getFields] first = #first value() second = #second value() return
END
|
|
|
Post by carlgundel on Jan 7, 2008 19:42:39 GMT -5
Hi All, This RB stuff is fun, but I can not find the answer to this. I have a text box that I want to have static text to the right of and it needs to be colored with a DIV. I can put it below, no problem. Do I need to use a table to do this? This is a very interesting CSS styling question. As I understand it, a DIV forces items to separated into different vertical spaces, so that items in the DIV appear below the item before the DIV and above the item after the DIV. The way to fix this is... errr... let me get back to you. -Carl
|
|
|
Post by mackrackit on Jan 7, 2008 19:52:23 GMT -5
No hurry.
|
|
|
Post by billw on Jan 7, 2008 19:52:47 GMT -5
The cleanest way to do this is to stick the textbox and text together in a DIV, and then use CSS to float INPUT elements (like textboxes) to the left. You'll need additional code if any text needs to be on the left, in addition to the right. This should get you started:
cssclass ".fixtext input", "{ float: left; margin-right: 1em; }"
html "<div class=""fixtext"">" textbox #t1, "" print "Howdy-ho!" html "</div>"
html "<div class=""fixtext"">" html "<span style=""float: left"">Example:</span>" textbox #t2, "" print "Shiny, huh?" html "</div>"
|
|
|
Post by carlgundel on Jan 7, 2008 19:57:18 GMT -5
Hi All, This RB stuff is fun, but I can not find the answer to this. I have a text box that I want to have static text to the right of and it needs to be colored with a DIV. I can put it below, no problem. Do I need to use a table to do this? This is a very interesting CSS styling question. As I understand it, a DIV forces items to separated into different vertical spaces, so that items in the DIV appear below the item before the DIV and above the item after the DIV. The way to fix this is... errr... let me get back to you. Here. I took some liberties with your example. I put the textbox and label together inside the DIV. The color didn't affect the textbox, but I suppose that might be a browser dependent thing. -Carl CSSID #Section1, "{Color: green;}" CSSID #bground, "{background-color: #EEE;}" answer$ = "?"
[display] cls DIV bground DIV Section1 print "Pythagorean theorem" END DIV DIV Section1 textbox #first, first print " LEG #1"; END DIV print DIV Section1 textbox #second, second print " LEG #2"; END DIV print DIV Section1 print " Hypotenuse = "; answer$ END DIV link #add, "CALC", [calc] END DIV wait
[calc] gosub [getFields] answer$ = str$(SQR((first*first)+(second*second))) goto [display]
[getFields] first = #first value() second = #second value() return
END
|
|
|
Post by mackrackit on Jan 8, 2008 4:32:37 GMT -5
Thank you Carl!
I was trying something like you did but did not quite have it.
|
|
|
Post by mikeukmid on Jan 8, 2008 8:28:41 GMT -5
Would you consider putting you RBPS url in the Links section of the RB wiki ?
Mike.
|
|
|
Post by mackrackit on Jan 8, 2008 12:29:34 GMT -5
Would you consider putting you RBPS url in the Links section of the RB wiki ? Mike. Done.
|
|
|
Post by carlgundel on Jan 8, 2008 13:32:00 GMT -5
Would you consider putting you RBPS url in the Links section of the RB wiki ? Mike. Done. Thanks for putting this online. I do have a couple of suggestions and an observation. 1) The lime color is really hard to read. May I suggest green? 2) The frame is too small. I see vertical and horizontal scrollbars. I observe that startup time for this web app is pretty long. This could be because: - It's an old PC - There isn't much memory on the computer - You're using the computer and Run BASIC is constantly being swapped out of RAM while you're busy using it for other stuff This makes for an interesting case study for RB users who want to make their servers public. Thanks again! -Carl
|
|
|
Post by mackrackit on Jan 8, 2008 15:56:25 GMT -5
Playing with colors...Green seemed a little dark so tried #FF00FF. May have to use a different background. Also increased the font size.
Increased the frame size. What resolution are you running? Tried it here at 1280x1024 and 1440x900 1024x768 and seems to be "OK" now.
The machine that RBPS is on has a 1.30Ghz with 760 MB ram running XP. Not the best but I do not use it for much. Tried RBPS on a box with UBUNTU, about the same specs, worked but was a little slower. Here the way I have it it will work quickly at times and slower at other times.
Just tested my connection speed with speakeasy.. download-244kbps upload-154kbps Not the best either.
Found another problem. My 17 year old college student left a LB program he is working on running on the RBPS and I did not know it. He has a memory leak.
Might be a bit better now, but with three college kids and my wife and myself sharing the same connection...Plus my web server and mail server. It may not get much faster here.
|
|
|
Post by carlgundel on Jan 8, 2008 16:59:54 GMT -5
Might be a bit better now, but with three college kids and my wife and myself sharing the same connection...Plus my web server and mail server. It may not get much faster here. Certainly better looking, and maybe slightly faster too. :-) Thanks! -Carl
|
|
|
Post by davidcoker on Jan 8, 2008 19:25:36 GMT -5
In regards to the discussion about appearance, I'm thinking that you folks must be using different browsers and comparing apples to oranges.
There is a huge difference in the way the page looks in IE when compared to Firefox!
...I'd be happy to post an image to show the differences, but currently do not have access to a public web server.
-Doc-
|
|
|
Post by carlgundel on Jan 8, 2008 19:29:02 GMT -5
In regards to the discussion about appearance, I'm thinking that you folks must be using different browsers and comparing apples to oranges. There is a huge difference in the way the page looks in IE when compared to Firefox! ...I'd be happy to post an image to show the differences, but currently do not have access to a public web server. -Doc- I hate to say it but IE is the litmus test if you want to make the biggest impression. -Carl
|
|