WordPress.org

Support

Support » How-To and Troubleshooting » Transparent body, adjusting margins.

Transparent body, adjusting margins.

  • Hi guys,

    First off, NOVICE. Very limited knowledge of word press but have some basic experience with HTML.

    All I want to do is to make the main body (i think this is the right terminology) of my homepage, transparent, so that I may see the background image I’ve put in behind the main text.

    Tied in with this, I would also like to adjust the margin dimensions of this ‘main body’ so that there isn’t an absurdly large gap between my scrolling photo slideshow and my menu bar.

    I thought this would be quite a popular forum topic but have yet to find it answered.

    Any help is gratefully received!!

    Thanks guys.

Viewing 15 replies - 1 through 15 (of 16 total)
  • WPyogi

    @wpyogi

    Forum Moderator

    It depends entirely on your theme and site — so a link to it will help someone help you.

    And yes, this question (or variant) has been asked often – -but the search function is admittedly not that great.

    I thought it would have…

    Here’s the site. http://dnaproductionsuk.com/

    My theme is Twenty Eleven

    WPyogi

    @wpyogi

    Forum Moderator

    Have you made any changes to theme files already? Hope not, as that’s very inadvisable — instead you should create a child theme — that way your changes won’t be erased when WP is updated.

    http://codex.wordpress.org/Child_Themes

    If you are only going to make CSS changes, a custom CSS plugin like jetpack is a good alternative approach.

    You can use CSS3 properties. Change this

    #page {
    background: #fff;
    }

    to this:

    #page {
    background:  rgba(255, 255, 255, 0.3);
    }

    I’ve been changing code in the editor yes, trial and error… but am unable to change anything.

    Each time I copy and paste the original code back in there though, so the code is as it was when the theme was built.

    WPyogi

    @wpyogi

    Forum Moderator

    You need to go back and make a child theme – changing theme files will lead to many problems down the road for you. You really don’t want to go there :).

    Better with a fallback like
    #page {
    background: rgba(255, 255, 255);
    background: rgba(255, 255, 255, 0.3);
    }

    If you want it to work with IE 6/7/8 you need to add this to your header

    <!--[if IE]>
    
       <style type="text/css">
    
       .color-block {
           background:transparent;
           filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7FFFFFFF,endColorstr=#7FFFFFFF);
           zoom: 1;
        } 
    
        </style>
    
    <![endif]-->

    You need to go back and make a child theme – changing theme files will lead to many problems down the road for you. You really don’t want to go there :).

    +1 > Child theme

    Hi Jhonb, thanks for getting involved.

    I did that swap in the code but the page appears just the same after I update. Does the update take a while to show effect? I’ve been changing that bit of code to things like

    #page {
    background: transparent;
    }

    based on what I saw on another forum and the page still ran as normal then too.. I would have thought it would make SOME difference…if only returning back an error.

    WPyogi

    @wpyogi

    Forum Moderator

    Thanks @jhonb – we definitely try to encourage that — as it’s always so horrible when someone posts saying, “oh my gosh, I didn’t make a child theme and now I’ve lost all my work for the past year.”

    @wpyogi no problem dude 🙂

    @adminforum87 No it changes directly. Please give me admin access, i’ll give a look. Btw you’ll need to make a child theme… It’s more flexible and you won’t lost your changes if you update your theme …

    Will do. I just have to work out how to make one! I’ll do some googling and work it out then I’ll paste this eventual solution in there.

    Is there a way I can send you my log in details in a private message?

    [moderated contact info]

    WPyogi

    @wpyogi

    Forum Moderator

    Hey both of you — it’s really against the forum guidelines to ask for admin access – sorry, but please don’t do that. @jhonb – I know you mean well but it’s just not smart for anyone to give access to someone they don’t know at all on a forum… Provide what help you can here.

    I don’t know how to make a child theme. Like the original poster, I’ve got some HTML experience, but am ambling through learning WordPress. I’d like to do the same things that the OP cited, but now I’m seeing that I should also consider the child theme.

    Can someone give a good sequence of what I should be doing? I’m using the Berlin theme.

    http://www.midtnmusic.com/mikecrutcher/

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Transparent body, adjusting margins.’ is closed to new replies.
Skip to toolbar