• Resolved feriousss

    (@feriousss)


    Hi.

    I would like change the position of the content sidebar of my website (https://ieltsly.com) so that it starts right from where the top menu ends.
    I’m using Twenty Fourteen Child Theme with slider enabled. I have learnt how to re-size the width of the slider and how to set it so that its width automatically changes. (By adding a code I found on this forum.)

    Could someone please tell me what changes should I make to what files in my theme? I have little knowledge about coding stuff so I would appreciate it if you can put it plain and simple. Thanks!

Viewing 15 replies - 1 through 15 (of 29 total)
  • Hello,
    you can use a margin-top ( CSS ) to move your content sidebar up little bit.
    in your child theme, open style.css and add the following CSS rule :

    .content-sidebar {
        margin-top: -70px;
    }

    or just locate .content-sidebar and add margin-top: -70px; to it.

    Thread Starter feriousss

    (@feriousss)

    Thanks for the code Sam. But what I want to do is to position the content sidebar on my page’s top right, next to the slider. This code doesn’t do that.

    JenR

    (@jennifer-roberts)

    @feriousss – what you are trying to do is not simple – it will likely require redoing the structure of the HTML (and corresponding CSS) – which can be pretty complicated particularly for responsive themes. So you may want to consider finding another theme that has more the layout you want.

    Agree with JenR, plus even if you manage it, the site will need testing and tweaking for different browsers and at different screen resolutions and that can take some effort.

    Thread Starter feriousss

    (@feriousss)

    @jenr, @lorro

    I somehow managed to do it using this code (obtained from a kind user on another forum);

    body.home #content-sidebar {
    position: relative;
    top: -400px
    }

    I know it’s not the perfect way to do it though, the sidebar overlaps with the last few lines from my static front page on portrait mobile screens, and even on desktop, before the slider fully loads, a few pixels from the top of the content sidebar remains invisible.

    Anyway it’s working fine except for these two issues. Any idea how I can fix the code?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Rather than trying to fix something caused by doing things wrong, I can help you do things right. But it’ll take some manipulating of PHP files as well as adding CSS modifications. Are you familiar with PHP? Don’t want to cause you a white screen of death.

    JenR

    (@jennifer-roberts)

    Using negative margins tends to have problematic side-effects – that’s exactly why I said you’d need to actually restructure the HTML ?? . If you are determined to stick with this theme, you could consider hiring someone to recode things for you – I’m guessing it’s likely beyond the scope of these forums.

    EDIT – didn’t see Andrew’s post above – you got the right guy to help you :)!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m guessing it’s likely beyond the scope of these forums.

    Almost Jen, but I have just had a cup of hot chocolate so I have temporary super powers for the next couple of hours.

    JenR

    (@jennifer-roberts)

    See my EDIT above – Awesome – lucky day for feriousss :)!!

    Maybe you should make it into a child theme and submit it? LOL!

    [Andrew: Yes, but I’ll have to attribute cocoa powder and even then it wouldn’t get enough credit]

    Thread Starter feriousss

    (@feriousss)

    Thanks @andrew and JenR ??

    Are you familiar with PHP?

    I’m not! :'(. I can copy and paste codes to the right place though! I’m pretty sure I can do this one. Lol.

    I know it’s too much to ask but I would appreciate it if there is a way you can let me know which codes should go where, and it’s done.

    Awesome – lucky day for feriousss :)!!

    I really hope so. I’ve been desperately looking for a solution for the last couple of days.

    Maybe you should make it into a child theme and submit it?

    Great idea! I will definitely do it. ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I can copy and paste codes to the right place though

    That’s still cool! Do you have FTP access?

    Thread Starter feriousss

    (@feriousss)

    That’s still cool! Do you have FTP access?

    I do. FileZilla Client is the software I use for FTP.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What files do you have already in your child theme?

    Thread Starter feriousss

    (@feriousss)

    What files do you have already in your child theme?

    content.php
    footer.php
    functions.php
    style.css

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you copy the ‘page.php’ file from the parent theme and paste it into your child theme?

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘How to reposition the content sidebar (right) to the top in homepage in 20-14?’ is closed to new replies.