Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - (X)HTML Height=100% | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Dragato

Goomba
Level: 9

Posts: 25/25
EXP: 3053
For next: 109

Since: 03-15-04
From: England

Since last post: 517 days
Last activity: 339 days
Posted on 06-03-04 09:22 PM Link | Quote
Im trying to converting my site to XHTML as it doesn't look too good on Mozilla . But anyway, I have an image set to height=100% so it stretches as more text is entered. But it seems XHTML ignores the height and width... I tried using 'style=' but I can't set the height as a percentage.

What I need is a way to set the height of the image (currently background image in a table cell) to 100%, or a way to make it stretch that conforms to XHTML
BGenesis

Red Goomba
Level: 11

Posts: 34/38
EXP: 5415
For next: 570

Since: 05-17-04
From: In the tyranny that is Brittania.

Since last post: 516 days
Last activity: 339 days
Posted on 06-04-04 01:36 AM Link | Quote
What's the different between HTML and XHTML? It should still allow height=""

EDIT: Oh, I saw that you were trying to give an IMAGE height=100%. This is not possible, as technically 100% is the actual height of the image [50% would be half the height] so the image can't stretch.


(edited by BGenesis on 06-03-04 04:37 PM)
Modereb

Paragoomba
Level: 15

Posts: 2/75
EXP: 14749
For next: 1635

Since: 06-04-04

Since last post: 350 days
Last activity: 339 days
Posted on 06-04-04 10:06 PM Link | Quote
That's because height isn't a valid attribute in most cases. When talking about images or most other objects, setting a height in pixels will work, but percentages don't. <table> tags for example don't have a valid height attribute at all.

There is no direct way of having a background image and making it stretch 100% over a cell background. A nice sollution would be to have an image that 'fades' into a background color, and which would be centered in the cell background using CSS:

<td style="background-color:#000000; background-image:url('url/of/image.jpg'); background-repeat:no-repeat: background-position:center;"></td>


(edited by Modereb on 06-04-04 01:06 PM)
(edited by Modereb on 06-04-04 01:06 PM)
(edited by Modereb on 06-04-04 01:07 PM)
(edited by Modereb on 06-04-04 01:08 PM)
(edited by Modereb on 06-04-04 01:08 PM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - (X)HTML Height=100% | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.013 seconds.