Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29

Thread: CSS Question

  1. #16
    New Coder
    Join Date
    Mar 2012
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks dan

    I have copied the design over to my clients domain and the footer has completely disappeared. Now I know this isn't a WP forum, so if I get anyones back up I apologise for asking but does anyone have any idea why that would happen?

    It's fine on (www.lm-lakeland-design.co.uk/lisa) but not on (www.janeritson-astrologer.co.uk/Blog). All I did was copy the theme folder over, nothing else. There are no plugins or anything installed, so it makes no sense.

    As I say I know this is really for the WP forum, so I understand if no one wants to answer, it's just I personally haven't found the responces on that forum to be that helpful.

    dee

  2. #17
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Looking at those sites now, the latter one still appears to have the twentyeleven theme activated. If you activate your custom theme it might help to identify the issue.

    No problem with WP questions here, incidentally.

  3. #18
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Ah, you've done that now.

    It almost looks like the footer.php and footerbar.php files are missing from the theme folder - have you checked they've copied across OK?

  4. #19
    New Coder
    Join Date
    Mar 2012
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    dan, I just changed the header to 100% as well as the Star_Top image above it, but while it has increased the width of the Star-Top image it hasn't moved ir over to the left (I added float:left; to that one too) and the header position or width hasn't changed at all.



    Quote Originally Posted by SB65 View Post

    No problem with WP questions here, incidentally.
    Thanks some forums are touchy about what you ask, my thought is if you don't like the post don't answer but not everone is like that

    Well I just checked on the server and both footer.php and footerbar.php are there

  5. #20
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    If I load the footerbar.php file directly from the new site (here) I get an empty document. As expected, on your test site it renders some content. I'd start with having a look at the content of that file.

    EDIT: Another possibility is that you have deleted the call to get_footer() from the index.php file in your theme.

    AND AGAIN: Or possibly the problem is in footer.php since it looks like the start of that file is rendering. Check this and footerbar.php
    Last edited by SB65; 03-04-2012 at 04:39 PM.

  6. Users who have thanked SB65 for this post:

    Dee2012 (03-04-2012)

  7. #21
    Regular Coder dan-dan's Avatar
    Join Date
    Aug 2009
    Location
    England
    Posts
    483
    Thanks
    22
    Thanked 79 Times in 78 Posts
    In regards to the header, because of the padding:15px; in the wrapper you'll need to declare the img width in px rather than %.

    Try width:970px; as that's the width of the wrapper.

  8. #22
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    dan-dan

    Sorry to interject, but that will not make #header extend to cover the width of #wrapper - what's needed is:

    Code:
    #header {
        background: url("images/Star_Top.jpg") repeat scroll 0 0 transparent;
        clear: both;
        margin: 0 -15px;
        padding: 10px;
    }
    There's no need for a width (or a float) - the block element will take up the full width available naturally without a width. Applying the negative margins will make the element extend the left and right beyond its normal position by 15px, negating the effect of the padding on #wrapper.

  9. #23
    New Coder
    Join Date
    Mar 2012
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks SB65, I don't know why they copied over empty, but I reuploaded the originals and modified them again and they are back

    The Star_Top is now the full width, but do I need to add a height to do the same with the header.jpg one? I tried the same code and it adjusted the width, perfect, but it's alterered the height.

    I did it on the test one (www.lm-lakeland-design.co.uk/lisa)

    Thanks guys

  10. #24
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    As it stands #splash will need a height, yes. #header doesn't need a height since it has content, and the content provides the height. #splash is an empty div so doesn't. If that makes sense....

    Having said all that I'd be inclined to have header.jpg as an image, not a background image - since it's part of the site, not just there for decoration. If you include the image directly, you won't need the height.

  11. #25
    Regular Coder dan-dan's Avatar
    Join Date
    Aug 2009
    Location
    England
    Posts
    483
    Thanks
    22
    Thanked 79 Times in 78 Posts
    Quote Originally Posted by SB65 View Post
    dan-dan

    Sorry to interject, but that will not make #header extend to cover the width of #wrapper - what's needed is:

    Code:
    #header {
        background: url("images/Star_Top.jpg") repeat scroll 0 0 transparent;
        clear: both;
        margin: 0 -15px;
        padding: 10px;
    }
    There's no need for a width (or a float) - the block element will take up the full width available naturally without a width. Applying the negative margins will make the element extend the left and right beyond its normal position by 15px, negating the effect of the padding on #wrapper.
    Right you are SB65, thanks.
    It's been a long day, my bad!

  12. #26
    New Coder
    Join Date
    Mar 2012
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Umm, would you mind explaining how I do that? I mean change it to an image as opposed to a background image.

    I understand what you mean about the height.
    Last edited by Dee2012; 03-04-2012 at 05:22 PM.

  13. #27
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Somewhere, probably in header.php you have:

    Code:
    <div id="splash"></div>
    If it were me, I'd make that:

    Code:
    <div id="splash"><img src="/path/to/header.jpg" alt="Jane Ritson - Astrologer" /></div>
    and remove the background-image from the css for #splash.

  14. Users who have thanked SB65 for this post:

    Dee2012 (03-05-2012)

  15. #28
    New Coder
    Join Date
    Mar 2012
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Edited
    Last edited by Dee2012; 03-05-2012 at 08:57 AM.

  16. #29
    New Coder
    Join Date
    Mar 2012
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by SB65 View Post
    Somewhere, probably in header.php you have:

    Code:
    <div id="splash"></div>
    If it were me, I'd make that:

    Code:
    <div id="splash"><img src="/path/to/header.jpg" alt="Jane Ritson - Astrologer" /></div>
    and remove the background-image from the css for #splash.

    I did that, make the header image 1000px wide, added a left margin and it works great, thanks loads


 
Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •