Forums

[resolved] content background repeats fine but starts too early (14 posts)

  1. thefearless
    Member
    Posted 1 month ago #

    The middle section which is behind the post writing on my blog is a png slice which repeats down the page. ( this is fine and it works ) problem is, it starts from the very top of the site and i want it to start 150 px from the top.

    anyone know what the code is to cause the middle section to be away from the top by 150px

  2. jonimueller
    Member
    Posted 1 month ago #

    I can probably figure that out, but not without a link to the site in question so I can look at your CSS and source code using FireFox Developer tools. (You should grab them too, they are invaluable for this kind of troubleshooting.)

  3. thefearless
    Member
    Posted 1 month ago #

    ah ok joni, here you go, to show you what i mean this is what is happening

    Here is my site

    http://tinyurl.com/yfov9au

    Here is the location of style.css

    http://tinyurl.com/yzprglc

    i.e6.css

    http://tinyurl.com/yk2lr4d

    i.e7.css

    http://tinyurl.com/yz9sfkt

    The container.png is the middle white area and you can see that in the style.css its being told to repeat itself downwards, shown below

    /*------------------------------------------------
    Containers
    --------------------------------------------------*/
    #container {
    width: 978px;
    margin: 0 auto;
    background: url(images/container.png) repeat-y;
    }
    
    /*------------------------------------------------

    That is fine but its starting at the very top and i need it to start around 150px in from the top so that the navigation comes first

    Now one more thing to add in the header.php the code shows this

    <body>
    <div id="container">
    	<div id="header">
    		<?php
    		if ($celadon_text_header == "true") { ?>
    			<?php
    			if (get_bloginfo('description')) { ?>
    				<a href="<?php echo get_bloginfo('url') ?>" id="logo_with_tagline"><?php echo get_bloginfo('name'); ?></a>
    				<span id="tagline"><?php echo get_bloginfo('description') ?></span>
    			<?php } else { ?>
    				<a href="<?php echo get_bloginfo('url') ?>" id="logo"><?php echo get_bloginfo('name'); ?></a>
    			<?php } ?>
    		<?php } else { ?>
    			<a href="<?php echo get_bloginfo('url') ?>" id="header_home_link"></a>
    		<?php } ?>
    		<div id="header_search">
    			<form method="get" id="site-search" action="./" >
    				<fieldset>
    					<label for="search_input" class="overlabel">Search</label>
    					<input type="text" value="" name="s" id="search_input" />
    				</fieldset>
    			</form>
    		</div>
    
    	</div>		
    
    	<div id="navigation">
    		<div id="subscribe">

    Here is what my theme looked like before i removed the header image

    http://tinyurl.com/yk25waz

    Now i removed the header image as i want to have my bg.png visible and after removing that i thought i woud be able to see my background but instead i see the container.. look

    http://tinyurl.com/ykxh8uc

    what it needs to look like is this

    http://tinyurl.com/yhzrp4s

    but as you can see the only way i can get it to show the background at the top is by completely deleting my container.png file
    http://tinyurl.com/yl3noqm

    but then the middle part of my site where blog posts occur is not showing the white.

  4. ClaytonJames
    Member
    Posted 1 month ago #

    anyone know what the code is to cause the middle section to be away from the top by 150px

    This is just a guess. I'm not sure if it's exactly what you are after or not.

    #container {
    width: 978px;
    margin: 150px auto;
    background: url(images/container.png) repeat-y ;
    }

  5. thefearless
    Member
    Posted 1 month ago #

    clayton yeah thanks for the try but that margin is for left and right, if i change that to 150 it shifts everything over

    Its not over that i need its having the container.png start 150px in from the TOP edge

  6. ClaytonJames
    Member
    Posted 1 month ago #

    it's for the top. change it 150px not 150.

  7. thefearless
    Member
    Posted 1 month ago #

    ooooh very close, but all it did was shift it down.. i still have the container.png starting too early,

    that portion i have marked out red should be starting behind the menu bar instead its starting before the menu bar

  8. thefearless
    Member
    Posted 1 month ago #

    Its tricky

  9. thefearless
    Member
    Posted 1 month ago #

    The only thing i can think of is to take out from

    /*------------------------------------------------
    	Containers
    --------------------------------------------------*/
    #container {
    	width: 978px;
    	margin: 0 auto;
            background: url(images/container.png) repeat-y ;
    }
    
    /*------------------------------------------------

    this part

    background: url(images/container.png) repeat-y ;

    As thats the image and put it somewhere else in the css and call it seperately from the header.php using a seperate call

  10. thefearless
    Member
    Posted 1 month ago #

    I fixed it!!! whooo.. I did exactly what i said and removed it out of the container and created a new div id in the header.php and placed it in its seperate one in css and now it works

  11. jonimueller
    Member
    Posted 1 month ago #

    I'm getting ready to leave my office now. I will try to see what the deal is. I think it's a matter of shifting some divs around. Thanks for all the screen shots and explanations. I was trying to visualize what you want to accomplish and you've done an immensely wonderful job conveying that. The container is, I believe, what is holding the background image, but it also keeps the entire panel centered. This is a very graphic intensive theme. So you'll have to tread lightly.

    If you want the white panel underneath those nav tabs, create a new division called #wrap or #wrapper or #panel or something. Transfer the code from #container there. Then strip out the image info from the #container.

    Then go into your header and insert this:

    <div id="wrapper">
    right below the #nav division code.

    The tricky part will be to locate the closing </div> for the #container. Then put another closing </div> right before it for your newly created division. That *should* do it. I can tell more about it once I get in front of my own computer (we don't have FF at the office). :)

  12. jonimueller
    Member
    Posted 1 month ago #

    Did you fix it? It looks fine now.

  13. thefearless
    Member
    Posted 1 month ago #

    yes i fixed it

  14. thefearless
    Member
    Posted 1 month ago #

    Moderator, could you remove this thread entirely, kindly thanks

Reply

You must log in to post.

About this Topic

Tags

No tags yet.