Results 1 to 9 of 9

Thread: Centering a Code/Text Box in A Table Cell

  1. #1
    Member TomDunne's Avatar
    Join Date
    Feb 2011
    Location
    Hartford, WI
    Posts
    60

    Default Centering a Code/Text Box in A Table Cell

    Hi All,
    Not sure if this is a question for NOF, or for Mal's E-commerce. I am using Mals, and I put the code for ADD TO CARD in a text box and placed that box in a table. As you can see from the link below (this is a "test" page), the darn box won't center in the table cell - it's up at the top of the cell.

    All table settings are set to AUTO, but I did try Align Center.

    What am I missing? I would really appreciate your help..

    Thanks a lot,
    Tom


    http://advancedmold.biz/ground-plates.html

  2. #2
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    1,947

    Default

    It is a known bug that textboxes can't be centered in table cell

    get rid of the textbox and press Ctrl+T when cursor flashes in the table cell and paste your code

  3. #3
    Member TomDunne's Avatar
    Join Date
    Feb 2011
    Location
    Hartford, WI
    Posts
    60

    Default

    Thanks, Anton. Followed your advice - still no go. The form is still at the top of the cell...
    Have to come up with some kind of workaround.

    Thanks again for your reply,
    tom

  4. #4
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    1,947

    Default

    can I see a screenshot of your table with the inserted code in table cell (with Nof in page view)

    also, can you supply the code so I can test it here

  5. #5
    Member TomDunne's Avatar
    Join Date
    Feb 2011
    Location
    Hartford, WI
    Posts
    60

    Default

    Hi Anton,
    Thanks very much. Attached is a screen shot of the page-view code inserted. Also, this is the code:

    <FORM METHOD="POST" ACTION="http://ww8.aitsafe.com/cf/add.cfm">
    <INPUT TYPE="HIDDEN" NAME="userid" VALUE="A2275692">
    <INPUT TYPE="HIDDEN" NAME="product1[]" VALUE="1/4 X 12 X 12">
    <INPUT TYPE="HIDDEN" NAME="price1" VALUE="">

    <select name="productpr">
    <option value="1/4 X 12 X 12, AME15:150"> AME 15 $150.00</option>
    <option value="1/4 X 12 X 12, AME20:175"> AME 20 $175.00</option>
    <option value="1/4 X 12 X 12, AME25:200"> AME 25 $200.00</option>
    <option value="1/4 X 12 X 12, AME60:250"> AME 60 $250.00</option>
    < /select>
    <input name="return" type="hidden" value="http://advancedmold.biz/ground-plates.html">

    THIS IS THE CODE FOR THE BUTTON:
    <INPUT TYPE="SUBMIT" VALUE="ADD TO CART">
    </FORM>

    Click image for larger version. 

Name:	screen shot-page-view with code.jpg 
Views:	118 
Size:	305.9 KB 
ID:	2341

  6. #6
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    1,947

    Default

    1. enable layout is a form
    2. add the form action in form settings
    3. center the table cell pointer position with the center tool on text properties
    4. press Ctrl+T and paste all code except action and form closing tag

    see video
    http://www.videoproductions.com.au/NOF15/Anton-0054.mp4

  7. #7
    Member TomDunne's Avatar
    Join Date
    Feb 2011
    Location
    Hartford, WI
    Posts
    60

    Default

    Got it, Anton. What a great help you provided. Thanks so much!!
    Tom

  8. #8
    Member TomDunne's Avatar
    Join Date
    Feb 2011
    Location
    Hartford, WI
    Posts
    60

    Default

    Hi Anton,
    Your solution worked, but now I have a new problem...On the two example items I have published, when you choose one item (e.g. AME 25) on the top (first) row, it goes to the cart, but the item that goes to the cart is the "default" item in the row below....so I click on a 1/2" plate and it always adds to the card the 3/8" plate (AME 15) from the row below.

    It's like the form is reading the second row...This is the link to the page if you want to try it...It's got to be something simple....right?

    http://advancedmold.biz/ground-plates.html

    Thanks again,
    Tom

  9. #9
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    1,947

    Default

    that is because you did not delete the form closing tag from each inserted code </FORM> (as I mentioned in post6)

    Nof automatically adds the closing tag at the end of the Layout region

    also, you have not deleted the form action line from many of the items further below

    the inserted code must not have an action and must not have a form closing tag
    Last edited by antonsvideo; 01-15-2016 at 03:48 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •