WordPress.org

Ready to get started?Download WordPress

Forums

Using a BUTTON (6 posts)

  1. viralbytes
    Member
    Posted 3 years ago #

    I am trying to build a very simple menu using buttons inside a table. The table is just to make it look pretty. The button, when clicked, should take the User to anther page "Red Wine".

    When I click on the button, nothing happens... grrrrrrrrr
    Can anyone please correct this code and email it back to me
    at: viralbytes@yahoo.com

    Many thanks, Viral :o)

    My code:
    <center><table border="5" bordercolor="#660000" style="background-color:#FFFFFF" width="98%" cellpadding="3" cellspacing="3"></center>
    <tr>
    <td><center>
    <input type="button" value="Red Wine" onclick="http://funniest-vids.com/?p=42" />
    </center></td>
    </table>

  2. ClaytonJames
    Member
    Posted 3 years ago #

    Try this:

    <input type="button" value="Red Wine" onclick="location.href='http://funniest-vids.com/?p=42';" />

  3. viralbytes
    Member
    Posted 3 years ago #

    ClaytonJames.. how can I ever thank you... hours of hair tearing and nail biting solved in a flash...

  4. ClaytonJames
    Member
    Posted 3 years ago #

    Glad it helped.

  5. viralbytes
    Member
    Posted 3 years ago #

    oooooh Clayton, I spoke too soon

    What I'm trying to achieve is a simple menu in the sidebar
    so it is available on every page the visitor visits.

    This is my test site which I use to try things out.
    http://funniest-vids.com/

    Using buttons doesn't seem to work as they are too large and spread wider than the sidebar allows. I have no idea how to make them smaller.
    (See WINE MENU 1st try)

    I've tried something else and to be honest, it looks pretty naff.
    (See WINE MENU 2nd try)

    Do you have any ideas or can you point me in the right direction?

    Many thanks Viral.. :o)

  6. ClaytonJames
    Member
    Posted 3 years ago #

    I think the second attempt looks like a better idea than the buttons. It might look cleaner if you use "text-decoration:none;" to remove the underline on the links, and leave the text aligned left. Then you can style the "a" and "a:hover" colors as you see fit.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags