How do I center a shortcode object?

8 replies
  • WEB DESIGN
  • |
Hi,

For the last hour or so I've been trying to solve this problem but can't figure it out.

I am using optimizepress and trying to include a table in the sales page. I add short code " [ahm-pricing-table id=115 template=green] " but it appears left aligned on the page.

In the HTML editor:

I've tried adding " <center>[ahm-pricing-table id=115 template=green]</center> "

I've tried changing coding around the shortcode that says 'left' to 'center' and I've been trying other random things.

Nothing works. (I don't really know HTML so am just trying what I read on websites).

Can anyone tell me how to center it? It's really frustrating!:confused:

Thanks,
Nick
#center #object #shortcode
  • Profile picture of the author xtrapunch
    It depends on what the shortcode outputs. It must have some DIV/HTML elements. Target them using CSS.
    Signature
    >> Web Design, Wordpress & SEO - XtraPunch.com <<
    Web Design & SEO Agency | Serving World Wide from New Delhi, India

    {{ DiscussionBoard.errors[6486587].message }}
    • Profile picture of the author Nick Lawless
      Originally Posted by xtrapunch View Post

      It depends on what the shortcode outputs. It must have some DIV/HTML elements. Target them using CSS.
      Thanks for your response. But what are shortcode outputs and where do I find them?

      Not sure what DIV elements are either. I really have no coding experience. Only really basic stuff like adding a line break or making something bold.

      Looking forward to your response
      Signature
      Just starting online and need a website? Let me build one for you - FREE


      Click Here to claim a FREE customized website.
      {{ DiscussionBoard.errors[6486839].message }}
  • Profile picture of the author webpeon
    if you dont mind sharing the site address it might make it easier to locate the div for ya
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[6486869].message }}
    • Profile picture of the author Nick Lawless
      Originally Posted by webpeon View Post

      if you dont mind sharing the site address it might make it easier to locate the div for ya
      Hi Webpeon,

      The website is
      < Link removed by poster>

      I have a table used a couple of times that I am trying to centre (and trying to fit in the sign up box).

      Any help would be appreciated.

      Thanks
      Signature
      Just starting online and need a website? Let me build one for you - FREE


      Click Here to claim a FREE customized website.
      {{ DiscussionBoard.errors[6486889].message }}
  • Profile picture of the author webpeon
    this wont perfectly align it in the center, to do that would involve changing css in a number of different areas from what I can tell anyway. however, a work around for you in the meantime which sits the tables pretty close to center is to

    locate this file [file location removed as per TA request]

    then locate the following section (line 12 to 16)

    #shaon-pricing-table .pricing-table{
    width: 100%;
    margin: 20px;
    }

    and change it to the following

    #shaon-pricing-table .pricing-table{
    width: 100%;
    margin: 20px 20px 20px 160px;
    }

    its the last value '160px' which will push it away from the left margin, vary this value for different alignments
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[6487022].message }}
  • Profile picture of the author webpeon
    I just took another look at that fix and noticed you had a 3rd table inside the bottom box thats going to render that fix unusable...

    Heading to bed, getting late here... If you have no joy by tomorrow i'll grab another look at it for ya
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[6487130].message }}
  • Profile picture of the author Nick Lawless
    Thank You Webpeon!!! I spend hours trying to work it out earlier!

    It worked. Do you do web development?? I am thinking I have a few things coming up that I need to do that are beyond my capabilities and will need to outsource to someone.

    Let me know. PS do you mind removing the link to my site from your post? It's kinda scary it seems possible that people can see all the files on the site!

    Nick
    Signature
    Just starting online and need a website? Let me build one for you - FREE


    Click Here to claim a FREE customized website.
    {{ DiscussionBoard.errors[6487137].message }}
  • Profile picture of the author webpeon
    hehe link removed...

    drop me an email contact via PM and i'll have a chat to you about the web dev work tomorrow when Im thinking a bit more lively
    Signature
    Web 2 Mobile
    The Future of The Web
    {{ DiscussionBoard.errors[6487157].message }}

Trending Topics