Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

no net percent

Posted on 2002-04-07
7
Medium Priority
?
187 Views
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>
0
Comment
Question by:champs
7 Comments
 
LVL 14

Expert Comment

by:avner
ID: 6924722
try this :

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

0
 

Author Comment

by:champs
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.
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6924766
works okay in netscape 6.2;

lexxwern
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:champs
ID: 6924781
but please help for netscape 6 !!
0
 

Author Comment

by:champs
ID: 6924945
the code:

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

Accepted Solution

by:
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%">
    <tr>
         <td width="100%" height="100%"><img src="images/general/header_login.jpg" border=0></td>
    </tr>
</table>
0
 
LVL 18

Expert Comment

by:bruno
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.



BRUNO
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Suggested Courses

810 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