Support Forums

Lost styling because of adding table

This is a discussion on Lost styling because of adding table within the Technical Support forums, part of the Technical Support Forums category; Hi, I made a table for the front page, to include the userindex and since then i have lost styling ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 09-14-2008, 02:37 AM   #1
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default Lost styling because of adding table

Hi,
I made a table for the front page, to include the userindex and since then i have lost styling on headings on most of the pages. Screen shots here http://everythingsfree.org/image//im...962styling.jpg
Now even if i remove the table they still stay the same. How can i get them back to original? Where is the styling called and or what are they called in the style.css?

I will copy the table code bellow, should the table be calling a class?

Cheers,
Nick

Code:
	{if $body=='home.tpl'}
	<table border="0" width="100%">
		<tr>
				<td valign="top">
					<div id="content">
			{if $maffo_search}
               {include file=$maffo_search}
            {/if}
			</td>
			<td valign "top" width="55%">
		{include file=user/home2.tpl}
				</td>
		</tr>
	</table>{/if}
That is all i changed.
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 09-14-2008, 08:31 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Delete the contents of /templates_c and see if that gets your styling back if you reverted your changes.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 09-14-2008, 08:34 AM   #3
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default

Hi,
I have tried that but it did not help.
By the way what is the point of the templates_c folder? can it be deleted every couple of hours or is it best to leave it there?
Cheers
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 09-14-2008, 09:05 AM   #4
The Master
 
Maffo's Avatar
 
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,342
Rep Power: 52
Maffo is just really nice Maffo is just really nice
Default

Why does
PHP Code:
<div id="content"
have no closing tag?
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers.
Maffo is offline  
Old 09-14-2008, 10:27 AM   #5
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by bowers01
Hi,
I have tried that but it did not help.
By the way what is the point of the templates_c folder? can it be deleted every couple of hours or is it best to leave it there?
Cheers
smarty compiles the template files which is whats in the templates_c folder. The folder is required and its contents are auto generated.

As for your screen shots and code snippets, most of the time they dont give us the details to help you. Often times you dont explain what you dont like in the image and the tid bit of code isnt complete so helping is difficult. Furnishing us with a link is the best way to get help.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 09-14-2008, 05:36 PM   #6
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default

Hi,
Maffo the <div id="content"> was closed just below what i had copied.
Go to Truck And Machinery.com.au Hino Bus/Tram 1988 for an example, where it says the category it is in has no styling. And also Truck And Machinery.com.au the "Contact Us" has no styling.
All the code is here:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
	<meta name="author" content="Nick Bowers (truckandmachinery.com.au)" />
		{if $body=='user/userlogin.tpl'}
<title>{$sitetitle} - Log In</title>
{elseif $body=='contact/contactus.tpl'}
<title>{$sitetitle} - Contact Us</title>
{else}
<title>{$sitetitle}</title>
{/if}
	<meta name="Keywords" content="{$sitekeywords}" />
	{if $body=='home.tpl'}
<meta name="Description" content="{$sitedescription}" />
{elseif $body=='viewlisting2.tpl'}
<meta name="Description" content="TruckAndMachinery.Com.Au - {$description|nl2br|replace:'<br />':' '}" />
{else}
<meta name="Description" content="{$sitetitle} - {$sitedescription}" />
{/if}
	{if $smarty.server.SERVER_PORT == '443'}
	<base href="{$smarty.const.URLS}/" />
	{else}
	<base href="{$smarty.const.URL}/" />
	{/if}
	<link rel="stylesheet" href="templates/{$smarty.const.MAIN_TEMPLATE}/css/style.css" type="text/css" />
	<script type="text/javaScript">
	{literal}
	<!--
	function MM_openBrWindow(theURL,winName,features) 
	{
	  window.open(theURL,winName,features);
	}
	-->
	{/literal}
	</script>
	{$header}
	<script type="text/javascript" src="javascript/toggle.js"></script>
	<link rel="stylesheet" type="text/css" media="all" href="javascript/calendar/calendar-blue.css" title="winter" />
	<script type="text/javascript" src="javascript/calendar/calendar.js"></script>
	<script type="text/javascript" src="javascript/calendar/lang/calendar-en.js"></script>
	<script type="text/javascript" src="javascript/calendar/calendar-setup.js"></script>
	{modulehook function="tpl_layout_head" options=""}
			<script type="text/javascript" src="javascript/menu/dropdown.js"></script>
	<link rel="stylesheet" href="javascript/menu/common.css" type="text/css" />
</head>
<body>
	<body style="background-color: #FFFFFF">
	<div id="wrapper">
			<a href="{$smarty.const.URL}/"><img border="0" src="images/logo.jpg"></p></a>
<div class="layout">
	<!-- LOGO / PHONE END -->
	<!-- MAIN MENU -->	
		<div id="mainMenu">
        <div class="mainMenuCont">
            <div class="mainMenuBox">
                <ul id="navi_style">
                    <li   id="item1"><a href="{$smarty.const.URL}/index.php"    >HOME</a></li>
                    <li class="divider"> </li>
					<li  id="item3"><a href="{$smarty.const.URL}/pages.php?page=8">PRICES</a></li>
                    <li class="divider"> </li>
                    <li  id="item4"><a href="{$smarty.const.URL}/usercheckout.php"  id="t_menu4" rel="menu4">PLACE AD</a></li>
                    <li class="divider"> </li>
                    <li  id="item3"><a href="{$smarty.const.URL}/userindex.php" id="t_menu3" rel="menu3" >MY ACCOUNT</a></li>
                    <li class="divider"> </li>
                    <li  id="item2"><a href="{$smarty.const.URL}/pages.php?page=6">DEALERS</a></li>
                    <li class="divider"> </li>
                    <li  id="item5"><a href="{$smarty.const.URL}/contactus.php">CONTACT</a></li>
                   {if $smarty.session.username<>'' || $smarty.cookies.username<>""}
                   <li class="divider"> </li>
                    <li  id="item5"><a href="{$smarty.const.URL}/logout.php">LOGOUT</a></li>
				{else}
				{/if}
                </ul>
			</div>                
		</div>                
	</div>
	<div onmouseout="document.getElementById('t_menu1').className=''" onmouseover="document.getElementById('t_menu1').className='active'">
		<div id="menu1" class="dropmenudiv">
			<div class="sub_box_top"></div>
			<div class="sub_box_middle">
				<a href="#">link</a>
			</div>
			<div class="sub_box_bottom"></div>
		</div>
	</div>
	<div onmouseout="document.getElementById('t_menu2').className=''" onmouseover="document.getElementById('t_menu2').className='active'">
		<div id="menu2" class="dropmenudiv">
			<div class="sub_box_top"></div>
			<div class="sub_box_middle">
				<a href="#">link</a>											
			</div>
			<div class="sub_box_bottom"></div>
		</div>
	</div>
	<div onmouseout="document.getElementById('t_menu6').className=''" onmouseover="document.getElementById('t_menu6').className='active'">
		<div id="menu6" class="dropmenudiv">
			<div class="sub_box_top"></div>
			<div class="sub_box_middle">
				<a href="#">link</a>
			</div>
			<div class="sub_box_bottom"></div>
		</div>
	</div>
	<div onmouseout="document.getElementById('t_menu3').className=''" onmouseover="document.getElementById('t_menu3').className='active'">
		<div id="menu3" class="dropmenudiv">
			<div class="sub_box_top"></div>
			<div class="sub_box_middle">
				{if $smarty.session.username<>'' || $smarty.cookies.username<>""}
					<a href="{$smarty.const.URL}/userindex.php">{$smarty.const.LANG_MY_ACCOUNT}</a>	
					<a href="{$smarty.const.URL}/useraccountmodify.php">{$smarty.const.LANG_MODIFY_YOUR_ACCOUNT}</a>		
					<a href="{$smarty.const.URLS}/usercheckout.php">{$smarty.const.LANG_TPL_PLACE_AD}</a>
					<a href="{$smarty.const.URLS}/userbrowselistings.php">{$smarty.const.LANG_TPL_MODIFY_AD}</a>
					<a href="{$smarty.const.URLS}/logout.php">{$smarty.const.LANG_TPL_LOGOUT}</a>
				{else}
					<a href="{$smarty.const.URLS}/login.php">{$smarty.const.LANG_TPL_LOGIN}</a>
					<a href="{$smarty.const.URLS}/usercheckout.php">{$smarty.const.LANG_TPL_PLACE_AD}</a>
					<a href="{$smarty.const.URLS}/userbrowselistings.php">{$smarty.const.LANG_TPL_MODIFY_AD}</a>						
				{/if}						
			</div>
			<div class="sub_box_bottom"></div>
		</div>
	</div>
	<div onmouseout="document.getElementById('t_menu4').className=''" onmouseover="document.getElementById('t_menu4').className='active'">
		<div id="menu4" class="dropmenudiv">
			<div class="sub_box_top"></div>
			<div class="sub_box_middle">
				<a href="{$smarty.const.URL}/usercheckout.php">{$smarty.const.LANG_TPL_PLACE_AD}</a>
				<a href="{$smarty.const.URL}/userbrowselistings.php">{$smarty.const.LANG_TPL_MODIFY_AD}</a>																		
			</div>
			<div class="sub_box_bottom"></div>
		</div>
	</div>
	<div onmouseout="document.getElementById('t_menu5').className=''" onmouseover="document.getElementById('t_menu5').className='active'">
		<div id="menu5" class="dropmenudiv">
			<div class="sub_box_top"></div>
			<div class="sub_box_middle">
				<a href="#">link</a>
			</div>
			<div class="sub_box_bottom"></div>
		</div>
	</div>
	<div id="home">
	</div>
<script type="text/javascript">
// <![CDATA[
	cssdropdown.startchrome("navi_style")
//]]>
</script>
	{if $body=='home.tpl'}
	<table width="100%">
		<tr>
				<td valign="top">
					<div id="content">
			{if $maffo_search}
               {include file=$maffo_search}
            {/if}</div>
			</td>
			<td valign "top" width="55%">
		{include file=user/home2.tpl}
				</td>
		</tr>
	</table>{/if}
							<br />						<!-- // Content // -->
						{* This includes the content portion *}
						{include file=$body}
						<!-- // End Content // -->
					</td>
			</tr>
		</table>
		<div class="footer">
			<p>
				<a href="{$smarty.const.URL}/index.php" style="text-decoration: none">{$smarty.const.LANG_TPL_HOME}</font></a> ·
				<a href="{$smarty.const.URL}/toplistings.php?pg=featured" style="text-decoration: none">{$smarty.const.LANG_TPL_FEATURED}</a> ·
				<a href="{$smarty.const.URL}/toplistings.php?pg=new" style="text-decoration: none">{$smarty.const.LANG_TPL_NEW}</a> ·
				<a href="{$smarty.const.URL}/toplistings.php?pg=top" style="text-decoration: none">{$smarty.const.LANG_TPL_TOP}</a> ·
				<a href="{$smarty.const.URL}/category.php" style="text-decoration: none">Categories</a> ·
				{foreach from=$templatepages item="entry"}
				<a href="{$smarty.const.URL}/pages.php?page={$entry.pageID}" style="text-decoration: none">{$entry.pPageTitle}</a> ·
				{/foreach}
				<a href="{$smarty.const.URLS}/usercheckout.php" style="text-decoration: none">{$smarty.const.LANG_TPL_PLACE_AD}</a> ·
				<a href="{$smarty.const.URL}/contactus.php" style="text-decoration: none">{$smarty.const.LANG_TPL_CONTACT}</a>
				<br />
			© Copyright 2008 <a href="http://www.truckandmachinery.com.au" style="text-decoration: none">TruckAndMachinery.Com.Au</a></p>
		</div>
	</div>
{modulehook function="tpl_layout_footer" options=""}
{literal}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5043832-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
{/literal}
</body>
</html>
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 09-14-2008, 10:16 PM   #7
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

First of all - MAKE BACKUPS when you do significant changes. Secondly, you should have made a copy of your default template folder, renamed it and always worked on that. You have little way to go back to a standard which does work without mucking about. It is also much more difficult to upgrade as new versions are released again without mucking about. You will tend to overwrite things that you have already done and get in a tangle.

1. what are <div class="layout"> and <div id="home">doing in layout.tpl? I cannot see them defined anywhere? They are not in your style.css file.
2. what is this <body style="background-color: #FFFFFF"> doing in your layout.tpl file. It is already defined in your style.css file in body.
3. where is this line <div class="clear"></div> which is in the default layout.tpl file
4. Rename you template directory and download the default template and see if your contact page gets properly styled. If it does then copy its contents into your contact.tpl, test and modify slowly. Do this for all problem pages.
5. Best if you do this for the future. In your admin panel set the template to your template, leaving the default alone. You can switch between templates that way and see if you have made an error in a couple of minutes.

In this case I cannot see the obvious error why your <legend> tag and colour is not working or the styling on the box. Something seems to be overriding them.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 09-15-2008, 02:42 AM   #8
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default

Thanks for the tips, i always do a backup. I have a layout.tpl backup without the table and the user index and it works fine.
If i replace this
Code:
{if $body!='showlistings.tpl'}
				<td valign="top">
					<div id="content">
			{if $maffo_search}
               {include file=$maffo_search}
            {/if}
            			{/if}
With this
Code:
	{if $body=='home.tpl'}
	<table width="100%">
		<tr>
				<td valign="top">
					<div id="content">
			{if $maffo_search}
               {include file=$maffo_search}
            {/if}</div>
			</td>
			<td valign "top" width="55%">
				</td>
		</tr>
	</table>{/if}
Which is a table with maffos search mod in it and nothing in the other table, this is when then the problem starts.
So even though there might be a few errors in the layout.tpl it is not causing this problem.
It has soemthing to do with the table, even if i delete the maffo search mod from the first colum it still happens so it must be the table. Should it be calling a class?

Also were i have <body style="background-color: #FFFFFF"> this is because the menu i used has made the background a blue and it was easier than fixing it in the menu css.
Cheers
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline  
Old 09-15-2008, 07:17 AM   #9
The Master
 
Maffo's Avatar
 
Join Date: Mar 2006
Location: British in Argentina
Posts: 1,342
Rep Power: 52
Maffo is just really nice Maffo is just really nice
Default

PHP Code:
<td valign "top" width="55%"
missing = sign

Also, put something in the cell even it is pure space
PHP Code:
&nbsp
__________________
**Bulk Upload System** has been upgraded. Works on all v4 versions with new functionality. Free upgrade for existing customers.
Maffo is offline  
Old 09-15-2008, 07:21 AM   #10
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default

Hi,
What do you mean by missing = sign?
Also by adding   into the second cell did nothing, so i changed it back to the userindex.
Cheers
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template

Last edited by bowers01; 09-15-2008 at 07:26 AM.
bowers01 is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
installation problem, lots of database errors Chooser Technical Support 5 09-08-2008 09:09 AM
Adding Feature Item Table to HTML Page art Templates, HTML, CSS, and Design Help 11 08-05-2006 03:10 AM


All times are GMT -4. The time now is 02:57 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0