Center botton in custom module

Ecommerce design Joomla template to start your online business with VirtueMart and additional eshop features.
GK User
Thu Mar 03, 2011 12:16 pm
Hello,
I cannot center buttons in custom module. Might be something from css?
Image atached.
button.jpg


Thanks
User avatar
Fresh Boarder

GK User
Thu Mar 03, 2011 8:25 pm
can't see much from the image, please show us www..
User avatar
Platinum Boarder

GK User
Thu Mar 03, 2011 8:58 pm
Email sent, thanks
User avatar
Fresh Boarder

GK User
Thu Mar 03, 2011 9:02 pm
please point me in the right direction to where this button is...
User avatar
Platinum Boarder

GK User
Thu Mar 03, 2011 9:06 pm
Not too sure if this is what you're looking for, so here goes anyway...
Code: Select all
<div style="text-align: center; height: auto; width: 99.999%; margin: 0 auto;"><p>Whatever needs to be centered</p></div>
User avatar
Expert Boarder

GK User
Thu Mar 03, 2011 9:08 pm
found a button, but can't seem to see what css should do to make not want to be center...
User avatar
Platinum Boarder

GK User
Thu Mar 03, 2011 9:11 pm
as far as i can see what frshgs wrote works, then you just need to center the button ofcause :)
User avatar
Platinum Boarder

GK User
Thu Mar 03, 2011 9:13 pm
freshgs wrote:Not too sure if this is what you're looking for, so here goes anyway...
Code: Select all
<div style="text-align: center; height: auto; width: 99.999%; margin: 0 auto;"><p>Whatever needs to be centered</p></div>


Not worked.. stubborn.

@explodedk is under login module.
User avatar
Fresh Boarder

GK User
Thu Mar 03, 2011 9:14 pm
please send me joomla login, and i try look at it in the morning.. bed is calling :)
User avatar
Platinum Boarder

GK User
Thu Mar 03, 2011 9:15 pm
Alright, gnite :]

Later edit : worked only after i put it in a table and center it.
User avatar
Fresh Boarder

GK User
Thu Mar 03, 2011 9:18 pm
Is the page publicly accessible? If it is can you post a link and leave that inline css in the custom module please? What browser are you using?

EDIT: Humm too slow here! Not sure why the inline center didn't work. You shouldn't need to put that in a table.
User avatar
Expert Boarder

GK User
Thu Mar 03, 2011 9:19 pm
The site is in my profile, i made it, but not on "natural way".
User avatar
Fresh Boarder

GK User
Thu Mar 03, 2011 9:34 pm
If you get a chance maybe you could try it again thi time with no <p> tag.
Code: Select all
<div style="text-align: center; height: auto; width: 99.999%; margin: 0 auto;"><a target="_blank" title="Your Text" href="http://your_link.com/"><img alt="" src="image_path/yourimage.jpg" height="60" width="30" /></a></div>
User avatar
Expert Boarder

GK User
Thu Mar 03, 2011 9:52 pm
My code is :
Code: Select all
<input onclick="location.href='/link.html'" class="button" value="<< Click here >>" type="button" />


The only way worked (centered) was to put it like this:

Code: Select all
<center>
<table border="0">
<tbody>
<tr>
<td><input onclick="location.href='/link.html'" class="button" value="<< Click here >>" type="button" /></td>
</tr>
</tbody>
</table>
</center>


Thanks for effort.
User avatar
Fresh Boarder

GK User
Thu Mar 03, 2011 10:00 pm
I think this should work.
Code: Select all
<div style="text-align: center; height: auto; width: 99.999%; margin: 0 auto;">
<input onclick="location.href='/link.html'" class="button" value="<< Click here >>" type="button" />
</div>


EDIT: Are you sure there isn't already a button class in use already? Maybe try class"my_button" or something else unique.
User avatar
Expert Boarder

GK User
Fri Mar 04, 2011 4:35 pm
great you got it working ...
User avatar
Platinum Boarder

teitbite
Fri Mar 04, 2011 4:40 pm
Hi

Can I please see it ?
User avatar
Moderator

GK User
Fri Mar 04, 2011 8:09 pm
teit it's in his profile :)
User avatar
Platinum Boarder

GK User
Fri Mar 04, 2011 10:11 pm
Mail sent with access and info, thank you guys.
User avatar
Fresh Boarder

teitbite
Mon Mar 07, 2011 4:37 am
Hi

It's hard to tell as long as there are this <center></center> thing. But there are several methods to make it center:

Code: Select all
text-align:center !important;


or

Code: Select all
margin:0px auto !important;


One of this maight work.
User avatar
Moderator


cron