Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Can't align submit button in wordpress widget


rocknbil - 4:35 pm on Mar 5, 2012 (gmt 0)


The align attribute is deprecated (as is <font>, ugh :-) ), and what it does is centers the element in the page, not it's contents. It's entirely possible some other selector is affecting the div: if it's floated left, for example, or if some selector has assigned a width of 100% (of the parent.)

The text-align attribute will likely work **unless** the submit button has been assigned display: block (which is often the case with graphic background images on buttons.) In this case you'd need to do something like

<div id="submit-row"><input type="submit" value="submit"></div>

#submit-row input { margin: auto; }

Best is to see what's happening before changing anything - put it back where it was (without the align attribute) and install the FireFox extension Firebug. Right-click on the element and in the right pane of Firebug you can see all of the selectors affecting that element. Knowing Wordpress, there will be many.


Thread source:: http://www.webmasterworld.com/css/4424908.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com