niche Posted August 17, 2010 Share Posted August 17, 2010 Which property would be the easiest to use to center the the submit button under the input box in this script?Also, how do I change the styles of the submit button in this script? div style="clear:both;margin-bottom:7px;"></div><div style="margin-left:60px;"> <div> <form action="search.php" method="post"> <input type="text" name="search" /><br /> <input type="submit" value="Submit" /> </form> </div></div> Link to comment Share on other sites More sharing options...
niche Posted August 17, 2010 Author Share Posted August 17, 2010 <input style="color:blue;margin-left:40px;" type="submit" value="Submit" />That gets it centered and the test blue. How can change the color of the outline (the outline property won't do it) and the gray shading? Link to comment Share on other sites More sharing options...
Ingolme Posted August 17, 2010 Share Posted August 17, 2010 The border and background-color properties would modify the button. However, the button would then become a rectangle with solid colors. Link to comment Share on other sites More sharing options...
dsonesuk Posted August 17, 2010 Share Posted August 17, 2010 give submit button id or class ref<input type="submit" value="Submit" id="mysubmitbut" />#mysubmitbut {border-width:0; /* OR border: 1px solid blue; */color:blue;margin-left:40px;background-color: green;}or use background image#mysubmitbut { border-width:0; color:blue; margin-left:40px; width:90px;height:25px; background:url (mysubmitbutbgimg.png) no-repeat; }always leave a space between right bracket and no-repeat, IE has issues in showing background image if these are butted together. Link to comment Share on other sites More sharing options...
fulbish Posted August 17, 2010 Share Posted August 17, 2010 using css to align center: <div [b]style="text-align:center;"[/b]><input type="submit" value="Submit"></div> using html tags to align center: [b]<center>[/b]<input type="submit" value="Submit">[b]</center>[/b] to change the style of the submit button: <input type="submit" value="Submit" [b]style="color:red;...or whatever you want"[/b]> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.