?
Solved

Table control and Screen Width

Posted on 1998-10-28
8
Medium Priority
?
204 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
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 

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

Independent Software Vendors: 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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…
Suggested Courses

764 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