PDA

View Full Version : Actinic Templates not centred?


LouPhi
23-Nov-2010, 02:30 PM
I'm trying to bring a very old version 7 site up to date a bit using css for the layouts. I'm using a container <div> with a margin-left and margin-right of 'auto'...

In my non-Actinic pages, the entire site is centred... but in the Actinic templates (and all product pages) the site left aligns in Internet Explorer (looks fine in Firefox)

Heres the css for the container div:

#wrapper {
width: 790px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
}

Duncan Rounding
23-Nov-2010, 02:48 PM
Do you have a URL to see it?

leehack
23-Nov-2010, 02:49 PM
Not a lot wrong with that, although it is better better written as:

#wrapper {
width: 790px;
margin: 0px auto;
}

In the absence of an ever present URL per usual :rolleyes: i'll take a guess at you having defined an ID in the CSS, but defined it as a class in the code.

LouPhi
25-Nov-2010, 08:33 AM
Then you'd be wrong in your assumption! It IS defined as an ID in the code...

Here are the urls:

the homepage (not an Actinic template page):
http://www.countyindustrial.co.uk/

and an Actinic template driven page:
http://www.countyindustrial.co.uk/acatalog/promo1.htm

leehack
25-Nov-2010, 08:39 AM
For starters you have the same stylesheet defined twice in the head area and you have an empty actinic stylesheet reference also. Decide which one you wish to work with and delete the other.

LouPhi
25-Nov-2010, 09:48 AM
Thanks - I've removed the double-up on the stylesheet... but what do you mean by:

you have an empty actinic stylesheet reference also

If you're talking about the actinic stylesheet - it was just easier to leave the standard actinic stylesheet in place and copy across the stylesheet used on the non-actinic pages. I can't see any problem with referencing two stylesheets - unless this isn't what you mean??

leehack
25-Nov-2010, 09:52 AM
I have no issue with you pointing to 2 or more css stylesheets, i do it myself, if you firebug the site, you'll see that the actinic.css file is empty. Given that this file is usually filled up with around 1200 lines of the greatest css you could have ever seen written, i'd say you have an issue. Can't see any reason why not to do the home page in actinic also.

LouPhi
25-Nov-2010, 09:55 AM
The actinic.css file isn't empty? I don't know why firebug would be showing it as empty? You can view it here http://www.countyindustrial.co.uk/acatalog/actinic.css and its clearly not empty!

LouPhi
25-Nov-2010, 09:59 AM
I've changed the way the template files call the stylesheet - but they were originally exactly how the templates started life... so nothing to do with me. If you view in firebug you can now see that there is content in the actinic.css stylesheet.

None of these issues have corrected the original problem...??

leehack
25-Nov-2010, 10:21 AM
I can't see anything glaringly obvious, there's quite a few things that you do, that i do not though, so hard for me to see past those as reasons for this. Images at 100% width as spacers would be a prime example, maybe your form margins at the top are doing some sort of wrong inheritance. It's hard to say is the reality, it doesn't look like anything obvious. It may be something simple like an unclosed tag causing random results.

LouPhi
25-Nov-2010, 10:54 AM
Fixed it :)

For anyone reading this - it turned out to be as simple as no doctype being specified... but like I mentioned before, I haven't changed anything other than the content/layout in the templates, so this is how Actinic provided them. Obviously back then Actinic templates weren't bothered about doctypes!