HighDots Forums  

Fitting an image into a table

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Fitting an image into a table in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Barely Audible
 
Posts: n/a

Default Fitting an image into a table - 08-05-2009 , 03:20 PM






I'm currently trying to get an image to fit within a table on my web
site and have come up against a slight problem.

The page is here http://www.jedsite.info in the bottom rhs corner.

I want the image to fill the box it is currently in. I'm using the
following for the css

..page-divider-listing-sysop {
-moz-border-radius-bottomleft:8px;
-moz-border-radius-bottomright:8px;
background:#CBCBB9 none repeat scroll 0 0;
border-bottom:1px solid #808000;
border-left:1px solid #808000;
border-right:1px solid #808000;
height:auto;
margin:0 0 10px;

I cannot make the image fit it correctly - any suggestions anyone?

--
TTFN
Jim

Those who hesitate under fire usually do not end up KIA or WIA.
-- Murphy's Military Laws, #46

Reply With Quote
  #2  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: Fitting an image into a table - 08-05-2009 , 03:57 PM






Barely Audible wrote:

Quote:
I'm currently trying to get an image to fit within a table on my web
site and have come up against a slight problem. The page is here
http://www.jedsite.info in the bottom rhs corner.

I want the image to fill the box it is currently in. I'm using the
following for the css ...

I cannot make the image fit it correctly - any suggestions anyone?
Yes. You've forgotten to account for font ascenders and descenders.
Images don't have those. Remove the whole table the image is in, and put
it in a <div> instead.

Before you get much further, please see:
<http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.jedsite.info% 2F>
"Result: 114 Errors, 14 warning(s)"

Use 100% for the body font, and don't reduce that for content. Yours is
too small for me to read.
http://tekrider.net/html/fontsize.php

The page doesn't fit in my browser window - horizontal scrollbars are
not liked by anyone.

--
-bts
-Friends don't let friends drive Windows

Reply With Quote
  #3  
Old   
dorayme
 
Posts: n/a

Default Re: Fitting an image into a table - 08-05-2009 , 06:22 PM



In article <7du4dbF2chirgU1 (AT) mid (DOT) individual.net>,
Barely Audible <somewhere (AT) overthe (DOT) rainbow.com> wrote:

Quote:
I'm currently trying to get an image to fit within a table on my web
site and have come up against a slight problem.

The page is here http://www.jedsite.info in the bottom rhs corner.

I want the image to fill the box it is currently in. I'm using the
following for the css

....

I cannot make the image fit it correctly - any suggestions anyone?
A square image cannot quite fit a box that has rounded corners in - of
course. But let us assume you have none of your CSS at all except td
{border: 1px solid;}

You have paragraphs, that have nothing much to be seen in them, above
and below the image. These create a space above and below the image! Why
would you do this? It is like adding two spoons of sugar to a cup of tea
when you like unsweetened!

In addition to this we come to a seemingly well kept secret, images are
inline objects by default and are treated like big capitol letters,
space being provided for them by default (as if in case they are smaller
case and have descenders and ascenders). You can change the default
display property on the image to display: block; to get rid of this
factor.

--
dorayme

Reply With Quote
  #4  
Old   
Barely Audible
 
Posts: n/a

Default Re: Fitting an image into a table - 08-05-2009 , 07:50 PM



Beauregard T. Shagnasty wrote:
Quote:
Barely Audible wrote:

I'm currently trying to get an image to fit within a table on my web
site and have come up against a slight problem. The page is here
http://www.jedsite.info in the bottom rhs corner.

I want the image to fill the box it is currently in. I'm using the
following for the css ...

I cannot make the image fit it correctly - any suggestions anyone?

Yes. You've forgotten to account for font ascenders and descenders.
Images don't have those. Remove the whole table the image is in, and put
it in a <div> instead.

Before you get much further, please see:
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.jedsite.info% 2F
"Result: 114 Errors, 14 warning(s)"

Use 100% for the body font, and don't reduce that for content. Yours is
too small for me to read.
http://tekrider.net/html/fontsize.php

The page doesn't fit in my browser window - horizontal scrollbars are
not liked by anyone.

It had been a long day! thats all I can plead ;-) The errors I am not
too worried about as I am in the middle of converting the entire site
from HTML 3 to XHTML11 and fix the errors across the site as I come
across them (thank god for Search & Replace)

The DIV option cured most of it so I am happy - Thanks BTS

--
TTFN
Jim

The military loathes you, too, George.

Reply With Quote
  #5  
Old   
Barely Audible
 
Posts: n/a

Default Re: Fitting an image into a table - 08-05-2009 , 07:51 PM



dorayme wrote:
Quote:
In article <7du4dbF2chirgU1 (AT) mid (DOT) individual.net>,
Barely Audible <somewhere (AT) overthe (DOT) rainbow.com> wrote:

I'm currently trying to get an image to fit within a table on my web
site and have come up against a slight problem.

The page is here http://www.jedsite.info in the bottom rhs corner.

I want the image to fill the box it is currently in. I'm using the
following for the css

....
I cannot make the image fit it correctly - any suggestions anyone?

A square image cannot quite fit a box that has rounded corners in - of
course. But let us assume you have none of your CSS at all except td
{border: 1px solid;}

You have paragraphs, that have nothing much to be seen in them, above
and below the image. These create a space above and below the image! Why
would you do this? It is like adding two spoons of sugar to a cup of tea
when you like unsweetened!

In addition to this we come to a seemingly well kept secret, images are
inline objects by default and are treated like big capitol letters,
space being provided for them by default (as if in case they are smaller
case and have descenders and ascenders). You can change the default
display property on the image to display: block; to get rid of this
factor.

And the display: block cured the last problem - thanks D.

--
TTFN
Jim

"Artillery adds dignity, to what would otherwise be an ugly brawl"
-- Frederick the Great, king of Germany, 1740 to 1786

Reply With Quote
  #6  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: Fitting an image into a table - 08-05-2009 , 07:55 PM



Barely Audible wrote:

Quote:
The errors I am not too worried about as I am in the middle of
converting the entire site from HTML 3 to XHTML11 ...
Do you not wish to serve the site correctly? Please see:

http://tekrider.net/html/doctype.php

--
-bts
-Friends don't let friends drive Windows

Reply With Quote
  #7  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Fitting an image into a table - 08-05-2009 , 08:45 PM



Barely Audible wrote:

Quote:
It had been a long day! thats all I can plead ;-) The errors I am not
too worried about as I am in the middle of converting the entire site
from HTML 3 to XHTML11 and fix the errors across the site as I come
across them (thank god for Search & Replace)
Not too worried about errors with *XHTML*? HTML3.2 > XHTML1.1, a fools
errand IMO. If you want to do a it right HTML3.2 > HTML4.1 STRICT would
be a better course. You don't have a really pressing need for XHTML do you?

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Reply With Quote
  #8  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Fitting an image into a table - 08-05-2009 , 08:52 PM



Barely Audible wrote:
Quote:
dorayme wrote:
In article <7du4dbF2chirgU1 (AT) mid (DOT) individual.net>,
Barely Audible <somewhere (AT) overthe (DOT) rainbow.com> wrote:
BTW unless you are associated with the domain RAINBOW.COM, you really
should learn how to properly mung your email address!

I suggest using @ANYTHING.invalid

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Reply With Quote
  #9  
Old   
Barely Audible
 
Posts: n/a

Default Re: Fitting an image into a table - 08-06-2009 , 05:11 AM



Jonathan N. Little wrote:
Quote:
Barely Audible wrote:

It had been a long day! thats all I can plead ;-) The errors I am not
too worried about as I am in the middle of converting the entire site
from HTML 3 to XHTML11 and fix the errors across the site as I come
across them (thank god for Search & Replace)

Not too worried about errors with *XHTML*? HTML3.2 > XHTML1.1, a fools
errand IMO. If you want to do a it right HTML3.2 > HTML4.1 STRICT would
be a better course. You don't have a really pressing need for XHTML do you?

Advantages of HTML 4.1 over XHTML 1.1 Jonathan?

Do all browsers cater for it yet?

--
TTFN
Jim

"Life's tough......It's even tougher if you're stupid."
--John Wayne

Reply With Quote
  #10  
Old   
dorayme
 
Posts: n/a

Default Re: Fitting an image into a table - 08-06-2009 , 05:52 AM



In article <7dvl1lF2cg8nbU1 (AT) mid (DOT) individual.net>,
Barely Audible <anywhere (AT) but (DOT) here> wrote:

Quote:
Jonathan N. Little wrote:
Barely Audible wrote:

It had been a long day! thats all I can plead ;-) The errors I am not
too worried about as I am in the middle of converting the entire site
from HTML 3 to XHTML11 and fix the errors across the site as I come
across them (thank god for Search & Replace)

Not too worried about errors with *XHTML*? HTML3.2 > XHTML1.1, a fools
errand IMO. If you want to do a it right HTML3.2 > HTML4.1 STRICT would
be a better course. You don't have a really pressing need for XHTML do you?


Advantages of HTML 4.1 over XHTML 1.1 Jonathan?

Do all browsers cater for it yet?

You might browse at:

<http://www.spartanicus.utvinternet.ie/no-xhtml.htm>

and

<http://www.highdots.com/forums/alt-html/html-xhtml-15825.html>

Some old familiar names...

--
dorayme

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.