Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Table and include trouble

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Albino

Munky DesignsEstablished Member
Impact
17
50NP$ for a bit of css help

Hey

ok, i have my site, its made up of a tables (please dont preach about css).
I have a cell on the left, which holds my menu bar, and then three cells on the right to hold my content box. Everything works fine, until i use the php include function to include my menu bar. I have no idea, why it happens, but my page goes all messed up, and I cant edit it, it says im:
" Making this change would require changing code that is locked by a template or a translator. The change will be discarded. "
Ive used php include many times, before, but ive never had this problem before.

Heres the code with the php include in :

Code:
<html>
<head>
<title>News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<div align="center"><img src="table/Banner2.jpg" width="700" height="150"> </div>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td rowspan="4" width="190"><? include("BOMlinks.htm") ?></td>
    <td width="510" height="50"><img src="table/main_top.gif" width="510" height="50"></td>
  </tr>
  <tr> 
    <td background="table/main_mid.gif"> </td>
  </tr>
  <tr> 
    <td height="50"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>
</table>
</body>
</html>

also, here is an image of it messed up within dreamweaver:


and heres how it looks when i preview it:



as you can see it looks kind of fine, but the menubar has a wierd 1 px padding round it, that isnt specified in the coding.

I hope someone can help!

Thanks
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Don't know if it has anything to do but:
if I look at
HTML:
  <tr> 
    <td rowspan="4" width="190"><? include("BOMlinks.htm") ?></td>
    <td width="510" height="50"><img src="table/main_top.gif" width="510" height="50"></td>
  </tr>
Your table presumably has 2 columns but then we have:
HTML:
  <tr> 
    <td background="table/main_mid.gif"> </td>
  </tr>
  <tr> 
    <td height="50"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>
where there seems to be one column only
You should add a second column or use COLSPAN like this:
HTML:
  <tr> 
    <td colspan="2" background="table/main_mid.gif"> </td>
  </tr>
  <tr> 
    <td colspan="2" height="50"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>

Try to sanitize the table first. I don't know what is in the include file. Also check the output source on the browser side
 
0
Close
im not sure what you mean

nothing is spanning two columns, and dreamweaver works with the top row first (so menu bar and top content image) then 2nd row and 3rd row (mid image and bottom image).

I can send my files if you want, or attatch them?
 
0
Close
ok, got a bit of an extra problem.

If i put the full extension for the file, it works ok. BUT, there is a small border around the file it has included, which throws off my layout (admitedly only by 1px or so, but it annoys me). Any way i can get around this?

my page code is :

Code:
<html>
<head>
<title>News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" style="text/css"
href="bomstyle.css" />
</head>

<body>
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td class="title" colspan="2"><p><img src="table/Banner2.jpg" width="700" height="150"></p>
      </td>
  </tr>
  <tr> 
    <td class="menu" rowspan="4"><? include("http://localhost/BOM/BOMlinks.htm") ?></td>
    <td class="contenttop"><img src="table/main_top.gif" width="510" height="50"></td>
  </tr>
  <tr>
    <td class="mid"> </td>
  </tr>
  <tr>
    <td class="contentbottom"><img src="table/main_bottom.gif" width="510" height="50"></td>
  </tr>
</table>
</body>
</html>

my css code is :

Code:
body{
	/* background-color: #191B86 */
}
td.title{
	padding: 0px 0px 0px 0px;
	border-style: solid;
	border-width: 1px
}
td.menu{
	width: 190px;
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px 
}
td.contenttop{
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px; 
	width: 510px;
	height: 50px
}
td.mid{
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px;
	background-image: url('table/main_mid.gif')
}
td.contentbottom{
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px;
	height: 50px
}

thanks :)

NP$ for who ever can help
 
0
Close
Try changing:

Code:
td.menu{
	width: 190px;
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px 
}

...to...

Code:
td.menu{
	width: 190px;
	padding: 0px 0px 0px 0px;
	margin: 0px 0px 0px 0px ;
        border-width: 0px;
}
 
0
Close
border was already defined in dreamweaver, but ive added it to the css, still no change :(

i can send files to people or attatch them if it helps.
 
0
Close
can you zip and post the current files? Before doing that however I would suggest you actually size the td.mid css.... I.E.

td.mid{
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
width: 510px; /* Add the width... */
background-image: url('table/main_mid.gif')
}


Hope that helps.
 
0
Close
heres the attatched file, place in root directory and off you go :D
 
0
Close
The program you are using to slice your image is adding a Transparent/White spacer image. To see what I mean design a dark blue or black 1 pixel image and save it in place of your spacer.gif then view the page again. You should notice that the white border is now black.


Might want to redo your slicing so that it doesn't add that spacer image. Or did you add it? Hope that helps.
 
0
Close
thanks man, ill look into it, sorry for the lack of replies.
 
0
Close
right ok

50 NP$ for who ever can get the css to work in Ie as well as firefox

ive got too many things going on at the momet to worry about it :)

its prob only a 5 min job, and whoever does it, there may be more css jobs your way in the future :)
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back