...

View Full Version : html table issue



spok61438
08-02-2007, 06:25 PM
hi

I'll post a picture to explain best my thought.

http://img361.imageshack.us/img361/7241/untitledjb8.jpg

I want the graph picture to be lined up next to the Visitor Statistics text.

Here's the actual code:


<table cellpadding="1" cellspacing="0" style="border:1px solid #000000">
<tr>
<td width="150"><b><img src="counter.gif" width="16" height="16" /> Visitor Statistics </b></td>
</tr>
<tr>
<td style="border-top:1px solid #000000">
&raquo; <?php echo $online; ?> Online<br>
&raquo; <?php echo $day; ?> Today <br>
&raquo; <?php echo $week; ?> Week <br>
&raquo; <?php echo $month; ?> Month <br>
&raquo; <?php echo $year; ?> Year <br>
&raquo; <?php echo $all; ?> Entirely
<hr noshade="noshade" />
Record: <?php echo $record; ?> (<? echo date("d.m.Y", $record_time) ?>)
</td>
</tr>
</table>


thanks in advance for your help

Jutlander
08-02-2007, 06:35 PM
Surely you must have some stylesheet along with this? That font is Verdana, but that is not specified anywhere in your HTML (luckily that is).

spok61438
08-02-2007, 06:44 PM
sorry heres the css:


body {
font:11px verdana, arial, helvetica, sans-serif;
color:#222;
background: white url(bg.jpg) fixed bottom left no-repeat;
}
h1
{
color:#333;
font:1.1em/1 Georgia, "Times New Roman", Times, serif;
font-weight:700;
margin:2em 0 .5em;
}
h2
{
color:#333;
font:1em/1 Georgia, "Times New Roman", Times, serif;
font-weight:600;
margin:2em 0 .5em;
}
p
{
line-height:1.8;
margin:0 0 1em;
text-align: justify;
}
ol, ul
{
margin-top:0;
margin-bottom:1em;
line-height:1.8;
}
a
{
color:#333;
text-decoration:none;
font-weight:300;
}
a:link
{
color:#333;
}
a:visited
{
color:#444;
}
a:hover
{
color:#666;
}
body
{
margin:50px 0px; padding:0px;
text-align:center;
}
img
{
border: 0px;
margin:0 0 1em; HERE WAS THE MISTAKE
}
acronym
{
cursor: help;
}
#navcontainer
{
margin-left: auto;
margin-right: auto;
margin-bottom: 3.6em;
border-top: 1px solid #999;
z-index: 1;
}
#navcontainer ul
{
list-style-type: none;
text-align: center;
margin-top: -0.9em;
padding: 0;
position: relative;
z-index: 2;
}
#navcontainer li
{
display: inline;
text-align: center;
margin: 0 5px;
}
#navcontainer li a
{
padding: 1px 7px;
color: #666;
background-color: #eee;
border: 1px solid #ccc;
text-decoration: none;
}
#navcontainer li a:hover
{
color: #000;
border: 1px solid #666;
border-top: 1px solid #666;
border-bottom: 1px solid #666;
}
#navcontainer li a#current
{
color: #000;
border: 1px solid #666;
border-top: 1px solid #666;
border-bottom: 1px solid #666;
}

#content
{
width:640px;
margin:0px auto;
text-align:left;
padding:1.3em;
border:1px solid #666;
margin-bottom: 2.7em;
background-color:#eee;
}
#description
{
width:460px;
margin:0px auto;
text-align:left;
padding:0.6em;
border:1px dotted #888;
margin-bottom: 0.5em;
background-color:#f3f3f3;
}

#address ul
{
list-style-type: none;
margin-top: 4px;
}
#footer
{
text-align:center;
}

Jutlander
08-02-2007, 07:57 PM
Add this to your CSS:


#littleimage {
float: left;
padding-left: 5px;
margin: 0;
}

And this to your image:


id="littleimage"

sridharr
08-02-2007, 07:58 PM
Try adding align to your image tag. Like:

<img src="counter.gif" width="16" height="16" align="absbottom" />

The other options for align that you can try are:
- align = left
- align = baseline
- align = bottom
- align = texttop

Let me know if it works.

Sridhar

Jutlander
08-02-2007, 07:59 PM
The align attribute is deprecated.

sridharr
08-02-2007, 08:03 PM
I see it still works in IE & FF.

Do you mean to say that it might not work in future versions? What is deprecated

Jutlander
08-02-2007, 08:07 PM
As I said, the align attribute is deprecated, so CSS should be used instead. It still works, but that is probably because the layout engines rarely get updated. I for one, hope to see that all deprecated elements and attributes, won't work in the modern browsers in a few years.

spok61438
08-03-2007, 03:30 AM
I simply did :

img
{
border: 0px;
margin:0 0 0;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum