Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Getting Button Centered

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-06-2009, 08:03 AM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default Getting Button Centered

I have got this button in a tpl file that I'm trying get centered horizontally in the box. I have added the following to skin1.css in the Vertical Menu section. I am very green with using CSS so all help is appeciated.
Code:
} .MmySearchBox { margin: auto; }

.tpl file:
Code:
{capture name=menu} <form method="post" action="mmy.php" name="mmysearchform"> <select name="year2" style="width: 90%;"onchange="javascript:document.mmysearchform.submit ();"> <option value="" selected="selected">Select Year</option> <option value="2009">2009 <option value="2008">2008 <option value="2007">2007 <option value="2006">2006 <option value="2005">2005 <option value="2004">2004 </select><br> <select name="make" style="width: 90%;"onchange="javascript:document.mmysearchform.submit ();"> <option value"" selected="selected">Select Make</option> {foreach item=row from=$row} <option value="{$row.makeid}">{$row.makename}</option> {/foreach} </select><br> <select name="model" style="width: 90%;"onchange="javascript:document.mmysearchform.submit ();"> <option value="" selected="selected">Select Model</option> </select><br> <font class="mmysearchbox"><input name="getparts" type="submit" value="Get Parts" /> </form> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_mmy_search menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}
Attached Thumbnails
Click image for larger version

Name:	CenterButton.jpg
Views:	119
Size:	11.3 KB
ID:	1310  
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote
  #2  
Old 01-06-2009, 08:08 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Getting Button Centered

your class assignment has a lowercase M while the definition has an uppercase M.

They must match exactly.
__________________
xcart 5.1.2
Reply With Quote
  #3  
Old 01-06-2009, 08:21 AM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default Re: Getting Button Centered

Yeah, I caught that right after I posted, but the button remains on the left. Checked it with Firebug and it seems to be pulling the correct font class for the button. Is the font class statement in the .tpl file in the correct place?

Thanks!
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote
  #4  
Old 01-06-2009, 08:35 AM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Getting Button Centered

If this is all in a table, then just put align center i the <td>
__________________
Joe Holley
4.2
Reply With Quote
  #5  
Old 01-06-2009, 09:21 AM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default Re: Getting Button Centered

No table. The pulldown boxes and the button are in a single form which is "in" div tags from the rounded corners mod. I would be OK with all elements of the form being centered in the box if that makes any of this easier.

Here is the part of the CSS file that Firebug is saying the form is in.

Code:
div.xboxcontent div{ padding: 0 4px 0 8px; } * html .xboxcontent { height:1px; }
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote
  #6  
Old 01-06-2009, 09:22 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Getting Button Centered

wrap the button in a div tag, set width to 100% AND ALIGN TO CENTER
__________________
xcart 5.1.2
Reply With Quote
  #7  
Old 01-06-2009, 09:24 AM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Getting Button Centered

try removing the "center" attribute and setting margin to auto
margin: auto;
__________________
Joe Holley
4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:16 AM.

   

 
X-Cart forums © 2001-2020