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.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post

    can't get columns to line up right

    Hi all,
    I'm working to modify a magento storefront. I created a graphic template in psd and sliced it up and I can't for the life of me get it to line up right within the bounds of the storefront. I'm stuck on these things:
    -the header graphic is supposed to be 180px tall - I can't seem to get there (you'll see the dog's feet cut off)
    -my middle content block is just a few px out of line with the header
    -my footer is way out of line with everything.

    I would greatly appreciate any help in getting things to line up. I've been doing trial adjustments for the last hour and can't seem to find the right bit to tweek to get it to work.

    page in question is here http://naturalandraw.com/
    css is here http://naturalandraw.com/skin/fronte.../css/boxes.css

    thanks in advance.
    mark

  • #2
    Regular Coder
    Join Date
    Oct 2007
    Location
    Glencoe, Ontario, Canada
    Posts
    340
    Thanks
    19
    Thanked 27 Times in 27 Posts
    Well i can tell u why ur header is cut off the picture is 180px high but u have it set in the css as 142px

    Also get rid of that display:block you shouldnt need that.

    also find and fix this one error. http://validator.w3.org/check?uri=ht...Inline&group=0
    Last edited by PitbullMean; 03-28-2009 at 11:04 PM.
    Eric "PitbullMean" Melo
    Always Start your layout with*{border:0; margin:0; padding:0;}
    Be sure to Thank ALL Users who give assistance.

  • #3
    Regular Coder
    Join Date
    Oct 2007
    Location
    Glencoe, Ontario, Canada
    Posts
    340
    Thanks
    19
    Thanked 27 Times in 27 Posts
    Your layout would be more proper like this

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
    <html> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" > 
    <title>layout</title> 
    <style type="text/css"> 
    body,
    	html {
    		margin:0;
    		padding:0;
    		background:#000;
    		font-family: 'Calibri';
    	}
    	body {
    		min-width:750px;
    	}
    	#wrap {
    		background: #0D0D0D;
    		margin:20px auto;
    		width:970px;
    		border: solid 2px #000;
    	}
    	#header {
    		height:150px;
    		background:#333
    		color:#FFFFFF
    	}
    	#header h1 {
        	padding:5px;
    	    margin:0;
        }
    	#nav {
    		background: url(images/bg.jpg);
    		padding:5px;
    		border-bottom:solid 2px #3B3B3B;
    	}
    	#nav p{
    		display:inline;
    		margin-left:165px;
    		color: #fff;
    	}
    	#main {
    		text-align:left;
    	}
    	#main h2, #main h3, #main p {
    		color: #fff;
    		padding:0 10px;
        }
    	#sidebar {
    		float:right;
    		width:466px;
    		margin: 3px;
    		border: solid 2px #3B3B3B;
    	}
        #sidebar h2, #sidebar p {
    		color: #fff;
    		padding:0 10px;
        }
    	div.img {
    		text-align:center;
    	}
    	#footer {
    		background: url(images/bg.jpg);
    		clear:both;
    	}
    	#footer p {
    		color: #fff;
    		padding:5px;
    		margin:0;
        }
    		#message {
    			clear:both;
    			color:#fff;
    			text-align:center;
    	}
    	a {
    		color:#fff;
    	}
    </style> 
    </head> 
    <body>
    <div id="wrap">
    	<div class="style3" id="header">HEADER</div>
        <div id="main">
    <h2>MAIN WINDOW </h2>
      </div>
       <div id="footer">
    		<p>Footer</p>
      </div>
    </div>
    </body> 
    </html>
    Best of luck Keep inmind i just took this layout from a site i did for my grandmother, there may be some CSS attributes that i didnt use in the html so just delete em.
    Last edited by PitbullMean; 03-28-2009 at 11:22 PM.
    Eric "PitbullMean" Melo
    Always Start your layout with*{border:0; margin:0; padding:0;}
    Be sure to Thank ALL Users who give assistance.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello markstevensphot,
    That magento storefront is kind of a mess!
    Try this for your #header -
    Code:
     
    /* Style */
    .header { border-top:5px solid #0d2131; }
    .header-top-container {  
    background:url(../images/header_top_container_bg.jpg) repeat-x 50% 0; 
    height: 180px;
    }
    .header-top { padding:10px; }
    Your footer -
    Code:
    /********************** Footer */
    .footer-container { 
    background:url(../images/footer_container_bg.jpg) center; 
    }
    .footer { width:930px; margin:0 auto; padding:10px 10px 4em;  }
    .footer .store-switcher { display
    Not sure why the jog between header and .middle. That's some very convoluted and confusing CSS messing that up. I think your images are sliced a little wrong too. I would not have any 2,000px wide images like that header one. It might be better to have a header image the size it's supposed to be and put a background image behind the whole webpage, that would do away with that seem at the header. You could nest 2 divs to do that so you would have both your pattern and your gradient.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    markstevensphot (03-29-2009)

  • #5
    New Coder
    Join Date
    Dec 2007
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post
    thanks for the suggestions. I have a 2000px header (which I also thought was huge) because I was trying to do as little changing to their default storefront as possible. basically I was trying to just replace their graphics with mine.

    I'd really like to make the store look more like the template I bought (here http://naturalandraw.com/temp/subpage1.html) but that looks like it's way above me.

  • #6
    New Coder
    Join Date
    Dec 2007
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post
    so a strange thing, when I tell the footer graphic to be centered as suggested above, it just goes away...why? (seen here http://naturalandraw.com/)

    in anyone's personal opinion, what should getting a storefront like this cost to get it into a template with basically 3 page styles?

    many thanks
    Mark

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by markstevensphot View Post
    so a strange thing, when I tell the footer graphic to be centered as suggested above, it just goes away...why? (seen here http://naturalandraw.com/)

    many thanks
    Mark
    When you add center on the end like that, we're using shorthand. You can't have it read background-image anymore because it's more than just image.
    Should read like this -
    Code:
    .footer-container { background:url(../images/footer_container_bg.jpg) center; }.footer { width:930px; margin:0 auto; padding:10px 10px 4em;  }
    background shorthand


    ...
    Last edited by Excavator; 03-29-2009 at 02:10 AM.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #8
    New Coder
    Join Date
    Dec 2007
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post
    sweet, that fixed it. I'll check the slices for my odd 2px offset.

    one other question. I can't for the life of me figure out where the extra blue and brown below the footer are coming from...any clues? I tried the colorzilla app in firefox and the color it gave me isn't in the code anywhere.

  • #9
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by markstevensphot View Post
    where the extra blue and brown below the footer are coming from...any clues?
    Looks like some conflicting line-height? I'll let you dig through all that CSS to find where. For now, try commenting out this line in reset.css, like I've got hightlighted in red -
    Code:
    /******************************************/
    /***********[ Mage_CSS_A Reset ]***********/
    /******************************************/
    
    * { margin:0; padding:0; }
    
    body { 
    background:#496778 url(../images/body_bg.gif) 50% 0 repeat-y; 
    color:#2f2f2f; 
    /*font:12px/1.55em arial, helvetica, sans-serif;*/
    text-align:center; 
    }
    a { color:#1e7ec8; text-decoration:underline; }
    a:hover { color:#1e7ec8; text-decoration:underline; }
    a img { border:0;}
    :focus { outline:0; }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #10
    New Coder
    Join Date
    Dec 2007
    Posts
    47
    Thanks
    2
    Thanked 1 Time in 1 Post
    alright, I've fixed the line height conflict (no real idea how, but it's not there) and re-done the backgrounds in a less than 2billion px wide format.

    I'm now left with what feels like a newb question...when you hit naturalandraw.com you'll see that the content is awfully close to the outer edges of the "paper" background. I've tried to move them in 10-15px on each side and I keep creating inheritance problems. can someone suggest the intelligent way to figure out where to adjust without also adjusting the container that holds the background image or creating something that rolls down the line and changes every other div inside my containers?

    css is here:
    http://www.naturalandraw.com/skin/fr.../css/boxes.css

    I think the relevant bit is:
    Code:
    /* Structure */
    .wrapper { min-width:954px; }
    .header { text-align:left; }
    .header-top { width:930px; margin:0 auto; position:relative; z-index:100; }
    .header-nav { width:950px; margin:0 auto; }
    .middle { width:920px; min-height:400px; margin:0 auto; text-align:left; }
    .side-col { width:195px; }
    .col-left { float:left; }
    .col-main { float:left; }
    .col-right { float:right; }
    .col-1-layout .col-main { float:none; margin:0; }
    .col-2-right-layout .col-main { float:left; width:685px;  }
    .col-2-left-layout .col-main { float:right; width:685px; }
    .col-3-layout .col-main { width:475px; margin-left:17px; }
    
    /* Style */
    .header {  background:url(../images/header_bg.jpg) repeat-x; }
    .header-top-container {  background:url(../images/center_header_bg.jpg) no-repeat 50% 0; height:177px;}
    .header-top { padding:10px; }
    .header-nav-container { background:url(../images/center_menu_bg.jpg) no-repeat 50% 0; height:48px; }
    .middle-container { background:url(../images/main_bg.jpg) 50% 0; }
    .middle { background:url(../images/middle_bg.jpg) 50% 0 #3c2a0f;  padding:25px 25px 80px 25px; }
    thanks in advance, I'm getting a good education.


  •  

    Posting Permissions

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