You need to hurry up if you want it sorted tonight, im here for 3 more mins.
Announcement
Collapse
No announcement yet.
Centring Site Smart Theme
Collapse
X
-
Originally posted by BunSorry Lee,
I forgot to say I added the <div align="center"> directky after <body onload="<actinic:variable name="OnLoadScript" value="PreloadImages" />"> and put the "></div>. just before the </body> at the like in Bill's example.
Closing tag = </div>
your closing tag of ("></div>) may be the problem.
Comment
-
Originally posted by leehackPaste the code in here so i can see it.
Sorry Lee,
Here it is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><actinic:variable name="PageTitle" /></title>
<actinic:variable name="BaseHref" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="MSThemeCompatible" content="yes" />
<actinic:block if="%3cactinic%3avariable%20name%3d%22MetaKeywords%22%20%2f%3e%20%21%3d%20%22%22" >
<meta name="keywords" content="<actinic:variable name="MetaKeywords" />" />
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22MetaDescription%22%20%2f%3e%20%21%3d%20%22%22">
<meta name="description" content="<actinic:variable name="MetaDescription" />" />
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsP3PPolicyUsed%22%20%2f%3e"><link rel="P3Pv1" href="<actinic:variable name="P3PFullPolicyLink" />"></actinic:block>
<link href="actinic.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="actiniccore.js"></script>
<script language="javascript" type="text/javascript" src="actinicextras.js"></script>
<!-- Placeholder of cookie checking javascript code. Do not remove it! -->
<Actinic:COOKIECHECK />
<script language="javascript" type="text/javascript">
<!--
saveReferrer();
// -->
</script>
<actinic:variable name="JavaScriptArray" value="All Data From All Sections" />
<script language="javascript" type="text/javascript">
<!--
function YahooSections(ar)
{
var strIDs = '';
for (var i=1;i<=ar.length;i++)
{
if (ar[i].sURL != null)
{
strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b>' + ar[i].sName + '</b></span></a><br />';
{
if (ar[i].pChild)
{
for (var j=1;j<=ar[i].pChild.length;j++)
{
if (ar[i].pChild[j].sURL != null)
{
strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall">' + ar[i].pChild[j].sName + '</span></a><br />';
}
}
}
}
strIDs += '<br />'
}
}
return strIDs
}
//-->
</script>
</head>
<body onload="<actinic:variable name="OnLoadScript" value="PreloadImages" />"><div align="center">
<actinic:variable name="HeaderArea" value="Smart Header Area" />
<br />
<table width="923" cellspacing="0" cellpadding="1" border="0">
<tr>
<td valign="top" class="sidebar">
<actinic:variable name="SideBar" value="Smart Left Sidebar" />
</td>
<td valign="top">
<a name="top"></a>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" bgcolor="<actinic:variable name="Palette1" />" width="1%"><img src="theme_tab1_left.gif" alt="Left tab" /></td>
<td bgcolor="<actinic:variable name="Palette1" />" width="92%" height="20"><span class="boxheading"><actinic:variable name="BrochureName" /></span></td>
<td valign="top" bgcolor="<actinic:variable name="Palette1" />" width="6%" align="right"><img src="theme_tab1_right.gif" alt="Right tab" /></td>
</tr>
<tr>
<td class="bulk" colspan="3" style="padding: 5px;">
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e">
<!-- When logged in, this gives the company name, username and a login link -->
<Actinic:Variable Name="NowServing"/><Actinic:Variable Name="CurrentAccount"/><Actinic:Variable Name="LogoutSimple"/><br />
</actinic:block>
<div align="center">
<actinic:variable name="HeaderFooter" value="Header Text" />
</div>
<actinic:variable name="INNERLAYOUT" />
<div align="center">
<actinic:variable name="HeaderFooter" value="Footer Text" />
</div>
<actinic:variable name="ReferrerLink" />
</td>
</tr>
</table>
</td>
<td valign="top" class="sidebar">
<actinic:variable name="SideBar" value="Smart Right Sidebar" />
</td>
</tr>
</table>
</div></body>
</html>
Comment
-
Try changing:
<body onload="<actinic:variable name="OnLoadScript" value="PreloadImages" />"><div align="center">
<actinic:variable name="HeaderArea" value="Smart Header Area" />
<br />
To:
<body onload="<actinic:variable name="OnLoadScript" value="PreloadImages" />"><actinic:variable name="HeaderArea" value="Smart Header Area" />
<div align="center">
<br />
Comment
-
Okay I've now got:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><actinic:variable name="PageTitle" /></title>
<actinic:variable name="BaseHref" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="MSThemeCompatible" content="yes" />
<actinic:block if="%3cactinic%3avariable%20name%3d%22MetaKeywords%22%20%2f%3e%20%21%3d%20%22%22" >
<meta name="keywords" content="<actinic:variable name="MetaKeywords" />" />
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22MetaDescription%22%20%2f%3e%20%21%3d%20%22%22">
<meta name="description" content="<actinic:variable name="MetaDescription" />" />
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsP3PPolicyUsed%22%20%2f%3e"><link rel="P3Pv1" href="<actinic:variable name="P3PFullPolicyLink" />"></actinic:block>
<link href="actinic.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="actiniccore.js"></script>
<script language="javascript" type="text/javascript" src="actinicextras.js"></script>
<!-- Placeholder of cookie checking javascript code. Do not remove it! -->
<Actinic:COOKIECHECK />
<script language="javascript" type="text/javascript">
<!--
saveReferrer();
// -->
</script>
<actinic:variable name="JavaScriptArray" value="All Data From All Sections" />
<script language="javascript" type="text/javascript">
<!--
function YahooSections(ar)
{
var strIDs = '';
for (var i=1;i<=ar.length;i++)
{
if (ar[i].sURL != null)
{
strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b>' + ar[i].sName + '</b></span></a><br />';
{
if (ar[i].pChild)
{
for (var j=1;j<=ar[i].pChild.length;j++)
{
if (ar[i].pChild[j].sURL != null)
{
strIDs += '<a href="' + ar[i].pChild[j].sURL + '"><span class="actxxsmall">' + ar[i].pChild[j].sName + '</span></a><br />';
}
}
}
}
strIDs += '<br />'
}
}
return strIDs
}
//-->
</script>
</head>
<body onload="<actinic:variable name="OnLoadScript" value="PreloadImages" />"><actinic:variable name="HeaderArea" value="Smart Header Area" />
<div align="center">
<br />
<table width="923" cellspacing="0" cellpadding="1" border="0">
<tr>
<td valign="top" class="sidebar">
<actinic:variable name="SideBar" value="Smart Left Sidebar" />
</td>
<td valign="top">
<a name="top"></a>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" bgcolor="<actinic:variable name="Palette1" />" width="1%"><img src="theme_tab1_left.gif" alt="Left tab" /></td>
<td bgcolor="<actinic:variable name="Palette1" />" width="92%" height="20"><span class="boxheading"><actinic:variable name="BrochureName" /></span></td>
<td valign="top" bgcolor="<actinic:variable name="Palette1" />" width="6%" align="right"><img src="theme_tab1_right.gif" alt="Right tab" /></td>
</tr>
<tr>
<td class="bulk" colspan="3" style="padding: 5px;">
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e">
<!-- When logged in, this gives the company name, username and a login link -->
<Actinic:Variable Name="NowServing"/><Actinic:Variable Name="CurrentAccount"/><Actinic:Variable Name="LogoutSimple"/><br />
</actinic:block>
<div align="center">
<actinic:variable name="HeaderFooter" value="Header Text" />
</div>
<actinic:variable name="INNERLAYOUT" />
<div align="center">
<actinic:variable name="HeaderFooter" value="Footer Text" />
</div>
<actinic:variable name="ReferrerLink" />
</td>
</tr>
</table>
</td>
<td valign="top" class="sidebar">
<actinic:variable name="SideBar" value="Smart Right Sidebar" />
</td>
</tr>
</table>
</div></body>
</html>
But my page has gone completely blank!! No idea what's gone on there Lee?
Comment
-
Hi Lee,
I've done as instructed (I think ) and the site has centred apart from my main logo. Also, the text in left menu/navigation column has also centred as are the heading to each page. Is it possible to centre the site but leave the text as is?
I've loaded a test site up there at the moment so you can have a look.....that is if you don't mind as I appreciate that you’re probably busy.
Kind regards
Comment
-
If you are going to create a <div> within your code and also then assign it a class in your stylesheet, then you might as well just do <div align="center"></div>.
I would only suggest creating a class if you are going to apply this to a number of coding elements already in place, ie to an existing table.
The # creates an id - which can only be used once - the dot creates a class - which can be used multiple times, but surely both belong in the css file? Putting a div in the html which has no corresponding class or id definition in css will work, but defeats the whole object of having a css file in the first place.
[BTW - Thanks for correcting the auto 0; 0 auto; error.]Bill
www.egyptianwonders.co.uk…
Text directoryWorldwide Actinic(TM) shops
BC Ness Solutions Support services, custom software
Registered Microsoft™ Partner (ISV)
VoIP UK: 0131 208 0605
Located: Alexandria, EGYPT
Comment
-
Originally posted by wjcampbeJust picking up on this Lee, why would you recommend mixing presentation and content in the html file instead of seperating the two so that corrections and changes in presentation can be made in one place (the css file)?
Firstly, it is a user asking how to centre his website - automatically this tells me he has very little knowledge of html, so i give him the simplest and easiest method. Directing a non experienced user to a CSS file is (for me) something i'd always steer clear of if possible. It's also Actinic we're talking about here, with html styling, external CSS styling, internal styling and embedded styling. There isn't a single place for anything - including the stylesheet. A solitary <div> tag is going to have no real impact on anything.
It's basically the quickest way of doing it Bill and needs very little knowledge to do so is the main reason really. The effect on coding or loading would be so minimal, it realistically changes nothing and it doesn't go against the idea of a single styling place, as this is not in force anyway.
Originally posted by wjcampbeThe # creates an id - which can only be used once - the dot creates a class - which can be used multiple times, but surely both belong in the css file? Putting a div in the html which has no corresponding class or id definition in css will work, but defeats the whole object of having a css file in the first place.
Its all about opinions and what each person thinks is best, i can understand arguments for and against the principle. When I can help somebody and they seem to have little idea, then i will always err on the side of simplest and easiest, even if this will have a very minute effect on anything.
Comment
-
Originally posted by BunHi Lee,
I've done as instructed (I think ) and the site has centred apart from my main logo. Also, the text in left menu/navigation column has also centred as are the heading to each page. Is it possible to centre the site but leave the text as is?
I've loaded a test site up there at the moment so you can have a look.....that is if you don't mind as I appreciate that you’re probably busy.
Kind regards
I was unsure on why the first post hasn't worked, i was a little surprised. Which is why i recommended trying:
<body onload="<actinic:variable name="OnLoadScript" value="PreloadImages" />"><actinic:variable name="HeaderArea" value="Smart Header Area" />
<div align="center">
<br />
I wasn't sure what the HeaderArea was doing so just came below it to see what you said.
The coding should be as i first stated:
<body onload="<actinic:variable name="OnLoadScript" value="PreloadImages" />"><div align="center"><actinic:variable name="HeaderArea" value="Smart Header Area" /><br />
If this doesn't work then something is wrong your end as i have this working fine in front of me. With regards to the text movements i think you reported these before you started to try my suggestions. I would imagine that these are lingering from your previous attempts at things. I cannot see how a framing <div> could change anything to do with the text on your site, unless there is some strange inheritance happening.
Comment
-
Originally posted by leehackIf this doesn't work then something is wrong your end as i have this working fine in front of me. With regards to the text movements i think you reported these before you started to try my suggestions. I would imagine that these are lingering from your previous attempts at things. I cannot see how a framing <div> could change anything to do with the text on your site, unless there is some strange inheritance happening.
Would I be right in thinking that if I go to Design/Library/Layouts and tick the box 'Highlight Customised Layouts with *' ........find the changed layouts and then revert it back to facyory settings that this would remove any changes I had made then I would then be in a position to implement your code?
Comment
-
Yeah that should work, i can't foresee any problems, i would recommend doing a snapshot before though, just in case. Either that or go with Bill's suggestion, they will both work fine and have no effect on anything, do whatever you are comfortable with.
To get it as you want as quick as possible. Make the changes, upload the page to your website and then provide the url so we can take a look.
A third option is to just add align="center" into the opening table tag, so the very first time you see:
<table width="...............
Change that to:
<table align="center" width="....................
This type of styling can be seen throughout your site, so would also be fine to be there.
Comment
-
I've found all altered layouts via the * (there were only 3, associated with the 'Works Best With Smart Brochure Pages' and 'Works Best With Smart' layouts) all these have now been set back to the factory reset. I don't have anymore treated layouts.
It has occurred too me that I could have possibly been approaching this in the wrong way The two main layouts I'm using above already centre the site but I'm after the pages displaying like I have on my site at the moment (www.ecclestonanglingcentre.co.uk.) but not expanding to the edge.....having a fixed width, if that makes sense?
Sorry about all this
Comment
-
Bun
You have completely lost me.
The link you have provided is a site that is centered.
Everything we have spoken about, is to center your site.
You may have got it wrong in that you do not want your site centered, you want it to look like your existing site, which is in fact centered?
This rat is jumping ship. *splash*
Comment
-
Originally posted by leehackBun
You have completely lost me.
The link you have provided is a site that is centered.
Everything we have spoken about, is to center your site.
You may have got it wrong in that you do not want your site centered, you want it to look like your existing site, which is in fact centered?
This rat is jumping ship. *splash*
The site that's up there at the moment was done in V7 and the templates were edited in DW. I'm having a devil of a time trying to get my head around editing in V8
I think what I'll do is to continue to work on the site I'm doing now, get it uploaded and then ask for help then?
Thank you for your time
Comment
Comment