Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Table control and Screen Width

Posted on 1998-10-28
8
Medium Priority
?
212 Views
Last Modified: 2010-04-09
I have a table that I would like to take up only the screen width if the screen size is set below 800x600. If it is 800x600 or greater I only want it to take up 800 pixels.

For example, If I view it with a screen size of 1024x768 I only want it to take up 800 pixels.

Is this possible and if so, how???

jeffrey
0
Comment
Question by:jkelly061597
[X]
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
  • 4
  • 3
8 Comments
 
LVL 4

Expert Comment

by:chewymon
ID: 1839194
I don't think that it is possible in plain HTML.  You can use the percentage to fill the screen or the absolute to define the size.  You might be able to do it with a script that checks the display properties and uses if-then to define the tables.
0
 
LVL 4

Accepted Solution

by:
rafistern earned 800 total points
ID: 1839195
The following code works in NS3, NS4 and IE4. I haven't tested other browsers:

<BODY>
<img src="clear.gif" name="scrwid" width=100% height=1>
<script>
maxwidth=Math.min(document.images[0].width,800);
document.write("<table width="+maxwidth+">");
</script>
<noscript>
<table width=100%>
</noscript>
<tr>
<td>
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text
</td>
</tr>
</table>


</BODY>

It even works when you resize the window (if you reload the document in Netscape).
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1839196
BTW for the theorists: is this DHTML in NS3??
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:jkelly061597
ID: 1839197
Great...

Can you do more for me?

Take a look at this page:
http://library.advanced.org/10867/search.shtml

Here is where I'm test implementing this. If you look at the page in IE, then take a look at it in NS you will see a major difference...

Is there any way to make them look more alike?
0
 

Author Comment

by:jkelly061597
ID: 1839198
Great...

Can you do more for me?

Take a look at this page:
http://library.advanced.org/10867/search.shtml

Here is where I'm test implementing this. If you look at the page in IE, then take a look at it in NS you will see a major difference...

Is there any way to make them look more alike?
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1839199
For Netscape it is not enough to state cellspacing=0. You need to add border=0. This will solve your problem.
0
 

Author Comment

by:jkelly061597
ID: 1839200
One more thing,

How can I get rid of the grey line across the screen in NS4?

Can I just make an image thats gray?

jeff
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1839201
Your problem appears to be that the title bar and the content are seperate tables. Do the following:

                  <img src="clear.gif" name="scrwid" width=100% height=1 BORDER=0 ALT="">
                  <script>
                        maxwidth=Math.min(document.images[0].width,800);
                        document.write("<table width="+maxwidth+" BGCOLOR=BLACK BORDER=0 CELLPADDING=0 CELLSPACING=0>");
                  </script>
                  <tr><td>
                  <TABLE WIDTH="100%" BGCOLOR="#000000" BORDER=0 CELLPADDING=0 CELLSPACING=1>
                 <TR><TD><A HREF="cgi-bin/stats/ax.cgi?http://home1.gte.net/mvmmvm/bor/"><IMG SRC="media/navbar/bor.gif" WIDTH=23 HEIGHT=24 ALT="" BORDER=0 ALIGN="RIGHT"></A>
<A HREF="home.shtml"><IMG SRC="media/navbar/home.gif" WIDTH=79 HEIGHT=21 ALT="" BORDER=0></A>
<A HREF="intro/index.shtml"><IMG SRC="media/navbar/intro.gif" WIDTH=48 HEIGHT=21 ALT="" BORDER="0"></A>
<A HREF="spill/index.shtml"><IMG SRC="media/navbar/spill.gif" WIDTH=67 HEIGHT=21 ALT="" BORDER="0"></A>
<A HREF="cleanup/index.shtml"><IMG SRC="media/navbar/cleanup.gif" WIDTH=89 HEIGHT=21 ALT="" BORDER="0"></A>
<A HREF="results/index.shtml"><IMG SRC="media/navbar/results.gif" WIDTH=86 HEIGHT=21 ALT="" BORDER="0"></A>
</TD></TR>
                  </TABLE>
      <TABLE WIDTH="100%" BGCOLOR=BLACK BORDER=0 CELLPADDING=10 CELLSPACING=1>
             <TR>
               <TD WIDTH=120 VALIGN="top" BGCOLOR="SILVER">
   
etc..

i.e. have one table containing the two. This seems to solve the problem.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

636 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