No announcement yet.

HTML help Needed

  • Filter
  • Time
  • Show
Clear All
new posts

  • HTML help Needed

    I'm trying to make a couple of very basic changes to my Manufacturer Search page and I'm not quite getting it. My HTML is limited at best.

    Here is a link where you can view the page

    I added the code for Number in Stock and that works Great.

    I also added the Button for View Details - and it functions correctly but I want it centered like everything else - instead it's left alligned.

    Here is the code for that button:

    <input type="button" onClick="window.location='product.asp?itemid=[catalogid]';" name="Add" value="[category_buyitlink]" class="btn" align="center" valign="middle" onMouseOver="this.className='btn_over'" onMouseOut="this.className='btn'">

    I put the centering code that is bolded in both pieces of code I added. It worked on the Number in Stock code and that is now centered - but the View Details button isn't. I'm sure I'm missing something simple.

    Thanks for any insight you can provide.
    C Ekman
    Owner/Designer: Cobweb Corner

  • #2

    The align="center" code you have applies to the text within the button, not the button itself.

    You need to apply an alignment to the table cell itself, which is the <td> element.

    PHP Code:
    <td align="middle">
    input type="button" onClick="window.location='product.asp?itemid=[catalogid]';" name="Add" value="[category_buyitlink]" class="btn" align="center" valign="middle" onMouseOver="this.className='btn_over'" onMouseOut="this.className='btn'">    


    • #3
      Exactly what I needed- looks better now. Thanks for the help.
      C Ekman
      Owner/Designer: Cobweb Corner