• Resolved Jojo

    (@rework)


    Hi
    I am attempting my first child theme to make my blog page look like the rest of my website.

    I’ve been getting on really well but I’ve done something in the css of the side bar that means its now displaying under the body rather than next to it (although in the right location on the right hand side of the page!!)

    Is anyone able to help me understand where I’ve gone wrong please? CSS is copied below but if any further info is required please just let me know. Page link is https://jamieflynnbase.com/blog/?p=1

    div.sidebar {
    float:right;
    overflow:hidden;
    width:250px;
    min-height: 100%;
    background-color:rgba(0,45,80,0.6);
    margin:0 80px 0 150px;
    border: 30px solid rgb(0,45,80);
        border: 30px solid rgba(0,45,80,0.6);
        -webkit-background-clip: padding-box; /* for Safari */
        background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
    border-radius:25px;
    }
    * html #container {
    height: 100%;
    }

    Many thanks

    Jo

Viewing 12 replies - 16 through 27 (of 27 total)
  • Thread Starter Jojo

    (@rework)

    Ok, things have been going really well since this was fixed. However, regardless of what I put in my css file the default font for posts and pages will only change if I manually update it in each page/post.

    Here’s the css I have included:

    html, body {
    
            background: url(/images/background.png) no-repeat center center fixed;
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
    
    height: 100%;
    	<!--background-image:url('/images/background.png');
    background-repeat:repeat-y;-->
        font-family: "Trebuchet MS", Helvetica, sans-serif;
        font-size: 13px;
        color: #FFCC33;
        line-height:1.4em; /* 16*1.4=18 */
    }

    Can anyone advise why it’s not picking this up as default please?

    Thanks

    Jo

    Hi Jo,

    OH! Wait… CSS comments are /* mycomment */, not the HTML comment you have in the above for background-image. Remove or fix that.

    Paul

    Thread Starter Jojo

    (@rework)

    Hi Paul

    Thanks for getting back to me. So basically you mean I shouldn’t have this bit?
    html, body {

    it should just be
    body {
    without the html bit?

    Thread Starter Jojo

    (@rework)

    D’oh not to worry I’ve sussed what you meant!!!

    Not that bit at all but to get rid of the bit I’d commented out by using <!--[content]-->

    Did that and all is up and working!!

    Thanks so much Paul!

    Jo

    Fantastic, Jo. Keep on truckin’.
    Paul

    Thread Starter Jojo

    (@rework)

    I’m sorry…another questions… :-/

    So I’ve been doing really well and have set myself up a separate ‘splash’ page as the main entry page into the site but i cannot get the content of the splash page to centre. I have tried everything I can think of but it still doesn’t work. When I added the two images to the post I chose centre alignment. I’ve tried adding <center> tags to the html and I’ve even tried adding an overall page centering in the css but still no joy!!

    Can anyone see anything I’ve missed please?? here’s the link

    Thanks

    Jo

    Howdy,
    On those images (actually I did it on their containing divs:
    1. Give them margin-left:auto; and margin-right:auto;
    — This will center them insider their containing div.
    — It is important for them to have a specific width, which you already have on them. Don’t remove that width.

    2. You probably need to drop the “positioning:absolute;” for this to work.

    Good luck. Looks cool.
    Paul

    Thread Starter Jojo

    (@rework)

    Hi Paul

    Sorry a bit lost there, I can’t see I have a positioning:absolute anywhere?

    Thanks, it’s my younger brother’s website, he’s just mad I think!!

    Jo

    Howdy,

    It is a style applied directly to the <div> element, rather than being in your stylesheet. If you don’t already, you should install Firebug for Firefox or use Chrome developer extension (F12)

    Anyway, here is one example from the page:

    <div style="overflow: hidden; position: absolute;  width:575px; height:79px; z-index:1;">
    <img width="1" height="1" border="0" alt="" src="/home/jamiefly/public_html/wp-content/plugins/protect-content/protector.gif" title="Image Protector">
    </div>

    So, that <div> needs:
    a. remove position:absolute;
    b. add margin:0 auto;

    Best,
    Paul

    Actually that one is not a visible image… but the visible images are done the same way, with a div with inline styles. Check out the source and you’ll see.

    Thread Starter Jojo

    (@rework)

    ok thanks for that Paul, I’ve now installed Firebug. However, I discovered the code you were referring to was being generated by a plugin I no longer use so I have uninstalled the plug in but still can’t center my images. When I view it in Firebug now I just get the standard code generated by importing an image in WordPress.

    Thread Starter Jojo

    (@rework)

    I seem to have come across a little glitch ??

    When I view the site on my Mac in Firefox it looks great, but when I view it in other browsers the layout is all different. I know its very hard to get it exactly the same in all browsers but it would be great if I could at least get it similar.

    Here’s how I want it to look as it displays in FireFox on the Mac
    Here’s how it looks on Safari (and obviously when viewed on iPhone) with the two content boxes overlapping
    Here’s how it looks in Firefox on Windows with a huge gap between the two boxes
    Here’s how it looks in IE9 on Windows
    And here’s the CSS again

    Does anyone have any suggestions please?

    Thanks

    Jo

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘help with alignment of side bar’ is closed to new replies.