Won't center. - Post ID 226979

User 10077 Photo


Senior Advisor
1,095 posts

Here's the situation:
I have an image that is 320 pixels wide. It is in its own row with one 12-span column. The row is display:none until 509 pixels when it is display:block: I want it to center in the div, so I used text-align:center but it doesn't center. I use Firebug which lets me easily see all the other css that affects the tag. As far as I can tell, there isn't anything else that should stop it from centering. Any ideas?
ASK ME ANYTHING
I provide personalized help for Coffeecup Users including personal or group training for Site Designer, Web Form Builder and more via Zoom.
Email me at support@uscni.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/
User 2088758 Photo


Senior Advisor
3,086 posts
Online Now

I would check your max-width settings in the RLM. Make sure your image max widths are set to none.
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 2484360 Photo


Registered User
3,293 posts

Brian Durfee wrote:
Here's the situation:
I have an image that is 320 pixels wide. It is in its own row with one 12-span column. The row is display:none until 509 pixels when it is display:block: I want it to center in the div, so I used text-align:center but it doesn't center. I use Firebug which lets me easily see all the other css that affects the tag. As far as I can tell, there isn't anything else that should stop it from centering. Any ideas?


If you are using RLM then you would need to go into your 509 breakpoint and set the margin right and left to Auto.

Also you need to make sure the image is set to display block as only block level elements are effected by auto margin, and images are defaulted to inline-block.
User 10077 Photo


Senior Advisor
1,095 posts

I implemented everything and it still didn't work. The image was an image link. After much searching the css, I discovered a{text-align:left;}. I added an id that centered it and that took care of the problem.

ASK ME ANYTHING
I provide personalized help for Coffeecup Users including personal or group training for Site Designer, Web Form Builder and more via Zoom.
Email me at support@uscni.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/
User 12358 Photo


Registered User
55 posts

Hi Brian,
Do you have a link we can view the page?
User 471718 Photo


Support Specialist
80 posts

Hi Brian,

Glad to hear you have it working! The image link was not centering because there was a glitch with these elements and they weren't behaving like the rest of images. Now it is corrected and in the next update you will be able to center image links using the "margin:auto auto/display:block" combination without problems. Sorry for the troubles!
"Do you want to make cool responsive website layouts? Check out Responsive Layout Maker Pro and start creating your own responsive layout design now at at http://www.coffeecup.com/responsive-layout-maker-pro/ "

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.