WordPress.org

Ready to get started?Download WordPress

Forums

How to position a button on my page (2 posts)

  1. damokilbride
    Member
    Posted 1 year ago #

    Hi, new to all this and having trouble positioning my redirect button on my page. It currently defaults to the left but i want to place in more central.

    <form action="http://www.ryanair.ie/contact/" method="LINK"><input type="submit" value="Book Free Flight" /></form>

    I have used

    <head>
    <style type="text/css">
    form
    {
    position:absolute;
    left:100px;
    top:150px;
    }
    </style>
    <head>

    [please mark any posted code - http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

    but this seems to move all buttons and not just the 1 i wish to reposition. Also when i put this code in the editor and save it, its not there when i try to edit the page again?

    Im a bit lost?

    Any help would be appreciated.

    Thanks Damo

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    formatting should be done using css in style.css of the theme;

    to influence only one button, it has to have a unique css class or css id;

    example:
    <form class="ryanair" action="http://www.ryanair.ie/contact/" method="LINK"><input type="submit" value="Book Free Flight" /></form>

    and the added css in style.css might be:

    form.ryanair
    {
    position:absolute;
    left:100px;
    top:150px;
    }

    untested - for more details about positioning see http://www.w3schools.com/Css/css_positioning.asp

Topic Closed

This topic has been closed to new replies.

About this Topic