Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Problems with Buttons

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #203746
    amitzala
    Participant

    Hi There

    I’ve been using the following code for two buttons on the homepage of this site

    dac.youbambuu.com

    I originally posted this up on the CSS forum – you can see the backstory here – which includes the code I am using.

    https://css-tricks.com/forums/topic/problems-aligning-two-buttons-next-to-each-other/

    For some reason the code is not doing what I am asking – or probably much more likely I am not using the right code –

    Please help !!

    #203748
    amitzala
    Participant

    @chrisburton – Hi thanks for chiming in .. I’m really new to coding and PHP so not quite following you. At the moment the code is

    [button label=”Join Us” url=”http://dac.youbambuu.com/?page_id=158″%5D
    [button label=”Book Us” url=”http://dac.youbambuu.com/?page_id=160″%5D

    Where is the <br> ? I want the buttons in the middle but next to each other if that helps ….

    #203750
    amitzala
    Participant

    @chrisburton Yes I’m using WordPress Text editor

    #203751
    chrisburton
    Participant

    @amitzala Hmm. I don’t use WordPress but there should be a code that you can add to functions.php that will stop WordPress from automatically adding break tags.

    In your CSS file, you need to find .tt_sc and add display: inline-block; to it. The only thing that is preventing your buttons from being side-by-side (inline) with each other is the break tag that is visible when you view the page source code.

    #203752
    chrisburton
    Participant

    Let’s try this. Remove the whitespace between the two shortcodes.

    [button label=”Join Us” url=”http://dac.youbambuu.com/?page_id=158″][button label=”Book Us” url=”http://dac.youbambuu.com/?page_id=160″]
    

    In your CSS file, do what I suggested above. This might work.

    .tt_sc {
        display: inline-block;
        /** if you have anything else inside of here, that's ok. **/
    }
    
    #203753
    amitzala
    Participant

    Ok I’m looking at the Beckett Stylesheet (style.css) – it’s a huge file any tips on how I locate this quickly ? WordPress doesn’t give you a search function !!

    #203754
    chrisburton
    Participant

    On OS X, try CMD + F and search tt_sc.

    On Windows, try Cntrl + F and search for tt_sc.

    #203755
    chrisburton
    Participant

    This is the file you need to edit: http://dac.youbambuu.com/wp-content/plugins/themetrust-shortcode/css/tt_shortcode.css

    And this is the change you need to make:

    .tt_sc { display: inline-block; margin-bottom: 1em; }
    
    #203756
    amitzala
    Participant

    @chrisburton – Thanks for all this – WordPress displays the file as a scrolling window – rather than all the text on one page – so the find function only looks at what is displayed !! So I need to go through it all when I have some time – I’ll do what you recommend then get back to you if there are any probs. Thanks for helping out.

    #203757
    chrisburton
    Participant

    Don’t you have access to the server?

    #203758
    amitzala
    Participant

    Ah through FTP you mean? Yes I do didn’t think of doing that – it’s hosted on my server space so yes – ok will do ! Cheers !

    #203759
    chrisburton
    Participant

    You should start using SFTP at the very least. But that’s another topic.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Back End’ is closed to new topics and replies.