no net percent

Posted on 2002-04-07
Medium Priority
Last Modified: 2010-04-09
why dont my percentages work in netscape 6.0? i have posted the code:-. when i changed the percentages to actual width and height it worked perfectly. but i need to use percentages because i am tagetting different screen resolutions

<td><img src=images/login.jpg width=100% height=100%></td>
Question by:champs
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 14

Expert Comment

ID: 6924722
try this :

<td><img src=images/login.jpg style="width:100%;height:100%"></td>


Author Comment

ID: 6924738
no luck with that either, actually i had already tried that before. i have the same problem with certain other elements like <select> and <textarea>. it only works when i actually specify the height and width but not in percentage.
LVL 12

Expert Comment

ID: 6924766
works okay in netscape 6.2;

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.


Author Comment

ID: 6924781
but please help for netscape 6 !!

Author Comment

ID: 6924945
the code:

<table border="0" cellpadding="0" cellspacing="0" height="17.5%" width="100%">
          <td style="width:100%;height:100%;"><img src="images/general/header_login.jpg" style="width:100%;height:100%;" border=0></td>
LVL 19

Accepted Solution

webwoman earned 200 total points
ID: 6925225
You can't use percentages on images, I doubt fractional percentages will work, and your syntax is wrong.

Don't blame the browser if you write bad code. ;-) You don't need height on the table tag, you've got it on the cells.

<table border="0" cellpadding="0" cellspacing="0" width="100%">
         <td width="100%" height="100%"><img src="images/general/header_login.jpg" border=0></td>
LVL 18

Expert Comment

ID: 6925395
there is a difference in how browser interpret % on images.

some browsers take it to mean that it should be a percentage of the browser window.  100% would be as wide as the whole browser.  

some browsers take it to mean a percentage of the full image width.  100% would be normal size, 50% would be half the size of the original image width.

i'm assuming by your problem NS6 is probably one of the latter, not the former, in which case, you will have to use some javascript to dynamically check the window.availWidth and then dynamically write out the code for the image size.


Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question