HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Can I arrange an Image in a Table like this??
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Table
View previous topic :: View next topic  
Author Message
metajake



Joined: 08 Nov 2007
Posts: 3

PostPosted: Thu Nov 08, 2007 7:19 am     Can I arrange an Image in a Table like this?? Reply with quote

Hello all,

Thank you for all the help I've recieved already, using your forum Archives.

I have a question about a basic site I'm building, regarding image placement in a table...

http://www.copperharborboatworks.com/chbw4/index.htm

See the image that says "up" in the left table?...

I was wondering how I might move that image to the TOP of the table... I've tried tagging it using CSS, as well as using the "align", "positioning" HTML codes, etc...

Is it possible to make this image be at the TOP of the table?...

Thank you for your help.
sticks464



Joined: 31 Dec 2006
Posts: 834

PostPosted: Thu Nov 08, 2007 9:09 am     Reply with quote

In a table you can use the attribure align for top, bottom and middle. Try setting the attribute to align="top" to the td.
metajake



Joined: 08 Nov 2007
Posts: 3

PostPosted: Thu Nov 08, 2007 11:40 am     Reply with quote

unfortunately, That does not solve my problem, Sticks465. The image remains in the Center of the Table. I will keep on trying.
Corey Bryant



Joined: 15 May 2004
Posts: 8154
Location: Castle Rock CO USA

PostPosted: Mon Nov 12, 2007 8:51 am     Reply with quote

In your source code you have
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><center>
<head>
<title>Copper Harbor Boat Works</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
   background-color: #CC6633;
   background-image: url(images/bg3.jpg);
   margin-top: 50px;
}
.menubgimage {
   background-image: url(images/menuimage.jpg);
   background-repeat: no-repeat;
   background-position: right center;
   background-color: #FFCC66;
   border-top-width: 5px;
   border-top-style: solid;
   border-top-color: #FFCC66;
}
.bannerimage {
   
   
}
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style3 {font-size: 12px}
.style4 {
   font-size: 14px;
   font-weight: bold;
}
-->
</style>

</script>
</head>

<body>
<center>
<table class="bannerimage" cellpadding="0" width="800" border="0">
  <tr vAlign=top >
    <td><img src="file:///Macintosh HD/Users/jacobnorth/Desktop/CHBoats/Web/CHBW4/images/logobannernew03.jpg"></td>
  </tr>
</table>
<table cellpadding="0" width="800" height="454" border="0">
  <tr>
    <td width="150" bgcolor="#FFCC66" class="menubgimage"><img src="images/button1.gif" width="152" height="37"></td>
    <td width="640" >&nbsp;</td>
  </tr>
</table>
<TABLE width=800 border=0 cellPadding=0 cellSpacing=0 bgcolor="#FFCC66">
              <BODY>
              <TR vAlign=top>
                <TD class=txt width=213>&nbsp;</TD>
                <TD class=style1 width=281><span class="style4">Copper Harbor Boat Works </span><span class="style3"><BR>
                Call: ??... <BR>               
                E-Mail: <A class=txt13b
                  href="mailto:infoatstancraftboats.com">copperkingatcopperharborbotworks.com</A></span></TD>
                <TD class=txt13 width=267>
                  <P align=right class="style1"><span class="style3">Website Copyright 2007<BR>
  Designed and Operated by </span><br><span class="style3"><A class=txt13b
                  href="http://www.jacob-north.com">www.jacob-north.com</A></span></P>                </TD>
    <TD class=txt width=39>&nbsp;</TD></TR>
    </TBODY></TABLE>
</center>
</body>
</center>
</html>
Get rid of the closing script tag before the opening body element (you don't have a script that is opened).

To center a website check out Centering.

I am guessing this is the problem one:
Code:
<table cellpadding="0" width="800" height="454" border="0">
  <tr>
    <td width="150" bgcolor="#FFCC66" class="menubgimage"><img src="images/button1.gif" width="152" height="37"></td>
    <td width="640" >&nbsp;</td>
  </tr>
</table>
You need to align this <td> to the top and you might consider not using height attributes.


_________________
Corey
Toll Free Numbers for Real Estate Agents | Merchant Accounts
sticks464



Joined: 31 Dec 2006
Posts: 834

PostPosted: Tue Nov 13, 2007 7:22 pm     Reply with quote

Add this to the tr
Code:
<tr valign="top">
    <td width="150" bgcolor="#FFCC66" class="menubgimage"><img src="images/button1.gif" width="152" height="37"></td>
    <td width="640" >&nbsp;</td>
  </tr>


or give the tr a class and style it with
html code
<tr class="name">
<td width="150" bgcolor="#FFCC66" class="menubgimage"><img src="images/button1.gif" width="152" height="37"></td>
<td width="640" >&nbsp;</td>

css
.name {
vertical-align:top;
}
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Table All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial