Post by barells » Sat Jun 27, 2009 5:14 am

I created a new template in order to use my dynamic site header. I've gotten everything to work successfully, except there is the most annoying oddity going on, where there is padding showing under the header images.

Here is my store page with the broken template:
http://www.swellinfo.com/cart

I've been analyzing code for hours now, and have determined that it is not the opencart style sheets, and it is not my style sheets. Outside of the Opencart code, the header works as it intended without the spaces around the images.

I"ve tried adding css margin/padding = 0 without luck. I am really at a loss of whats going on here. Any ideas here? Please help!

New member

Posts

Joined
Sat Jun 27, 2009 5:09 am

Post by readyman » Sun Jun 28, 2009 1:59 pm

Do you mean the vertical space between the "swellinfologo_big.png" & the "logo.png" (store logo) ?

If so, that's part of the div in the header-
#header .div1 (line 50 in the stylesheet) which has { height: 97px; } & #header div2 which pushes the store logo down 21px from the top.

Change to:

Code: Select all

#header .div1 {
	height: 65px;
}
#header .div2 {
	position: relative;
	top: 0;
	left: 15px;
}

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by barells » Sun Jun 28, 2009 8:43 pm

no, even when i remove the opencart stylesheet.css, it still occurs.

There are 2 places in my header images where there the blue background shows through the gray template, about 10px or so. I have checked and double checked, and there doesn't appear to be anything wrong with my code.

New member

Posts

Joined
Sat Jun 27, 2009 5:09 am

Post by Qphoria » Sun Jun 28, 2009 11:43 pm

im still not sure where you are talkin about padding.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by phpuk » Mon Jun 29, 2009 12:03 am

I don't understand what you would like us to look at.

A picture would be good.

in fact I have done one for you. download it and edit it to show where your problem is.
swellinfo.png

swellinfo.png (101.6 KiB) Viewed 3936 times


Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by barells » Mon Jun 29, 2009 12:45 am

hmmm. thats wierd, those notice warnings are still showing up for you. I got rid of them a day or so ago. Can you do a hard refresh on your browser to see if those warnings are removed.

Here is the what it looks like it for me:
Image

New member

Posts

Joined
Sat Jun 27, 2009 5:09 am

Post by phpuk » Mon Jun 29, 2009 12:48 am

The errors are displayed in all browsers firefox, chrome, safari, Opera, IE, etc...
Last edited by phpuk on Mon Jun 29, 2009 12:51 am, edited 1 time in total.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by phpuk » Mon Jun 29, 2009 12:50 am

I have just viewed your site with all of the above browsers and I do not see the background showing through issue.

What browser and what version of that browser are you using?

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by barells » Mon Jun 29, 2009 12:53 am

bizarre... this shows as in the image I attached on all of my browsers for me: firefox, chrome, safari, ie isn't working for me right now.

I previously had those error messages and fixed code...

Is there a cache issue going on here?

New member

Posts

Joined
Sat Jun 27, 2009 5:09 am

Post by phpuk » Mon Jun 29, 2009 3:08 am

Obviously this is the first visit to your site for me so no cache exists in my browsers.

Clear your browser cache and try again but clicking the refresh button should update it as this instructs the browser to get a fresh copy from the site.

Phil.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by barells » Mon Jun 29, 2009 5:35 am

nope, I've tried on multiple machines, and had a friend try as well. same result, no warning messages.

New member

Posts

Joined
Sat Jun 27, 2009 5:09 am

Post by phpuk » Mon Jun 29, 2009 5:46 am

Ok tried the same here and got a friend I was on the phone to at the time to try and he has the same errors displayed at the top of the page.

We are talking about the url http://www.swellinfo.com/cartthat you supplied at the top of this thread aren't we?

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by barells » Mon Jun 29, 2009 11:53 pm

ok, i've figured out a lot here... the error messages should not be there for you anymore. OpenCart must turn on the warning messages... so that the following if($_COOKIE['var']) creates a warning.

Anyway, take a look at the page now:
http://www.swellinfo.com/cart

When I get rid of this line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Then all is ok... Why is this? Also, if I add a break tag (<br />), as the first line, then the spaces under the images are removed. Is my code not complying with the DOCTYPE specified? Thanks.

New member

Posts

Joined
Sat Jun 27, 2009 5:09 am

Post by readyman » Tue Jun 30, 2009 1:25 am

Yeah, your code is definitely not going to validate as strict xhtml. I suggest using xhtml transitional or html4 and also cleaning up your code out of opencart before inserting it into the template file.
You've got a lot of inline styles and nested tables and rows there - I think you should simplify your code & the spaces will go away or at least it will be easier to see where the problem could be.

http://www.alreadymade.com
Follow me on twitter.com/alreadymade


User avatar
Global Moderator

Posts

Joined
Wed May 20, 2009 5:16 am
Location - Sydney

Post by barells » Tue Jun 30, 2009 3:41 am

I changed to Transitional and the problem went away. Thanks for your help.

New member

Posts

Joined
Sat Jun 27, 2009 5:09 am
Who is online

Users browsing this forum: Amazon [Bot] and 2 guests