Link to home
Start Free TrialLog in
Avatar of ethar turky
ethar turkyFlag for Saudi Arabia

asked on

display contents first.

Dear All,
In code below how can show up "contents" first then the "something here"

<table width="100%">
  <tr>
    <td width="33%" >something here</td>
    <td width="33%"  rowspan="3">
       <table  width="100%">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td >{contents}</td>
         </tr>
       </table>
    </td>
    <td width="34%" >something here</td>
  </tr>
  <tr>
    <td width="33%">something here</td>
    <td width="34%" >something here</td>
  </tr>
  <tr>
    <td width="33%" >something here</td>
    <td width="34%" >something here</td>
  </tr>
</table>
Is there is any other technic to do so?
==Please a professional answer is required==
Avatar of Timbo87
Timbo87

Do you mean a time delay? For example, showing contents immediately, then something here a little bit later? Or do you mean giving it a load priority? As of now, since contents occurs first in the page, it should load a tiny bit before something here.
Could you be more explicit about what you want, the question is ambiguous. One of your problems to strat with is that you hve more than table in a cell. If you could should schematically show what you would like the table to look like we can do it for you.
What i understood from ur questn  is that u need  some thing like this

contents               something        contents          

Try out this






<table width="100%">
  <tr>
    <td width="33%" >{contents}</td>
    <td width="33%"  rowspan="3">
       <table  width="100%">
         <tr>
           <td>SOMETHING HERE</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td>SOMETHING HERE</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td>SOMETHING HERE</td>
         </tr>
       </table>
    </td>
    <td width="34%" >{contents}</td>
  </tr>
  <tr>
    <td width="33%">{contents}</td>
    <td width="34%" >{contents}</td>
  </tr>
  <tr>
    <td width="33%" >{contents}</td>
    <td width="34%" >{contents}</td>
  </tr>
</table>




         
Hi there!

Switch the second column (with rowspan=3 and the contents) with the first one (something here) like so:

<table width="100%">
  <tr>
    <td width="33%" rowspan="3">
         <table  width="100%">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%">
         <tr>
           <td >{contents}</td>
         </tr>
       </table>

      </td>
    <td width="33%">
            something here
    </td>
    <td width="34%" >something here</td>
  </tr>
  <tr>
    <td width="33%">something here</td>
    <td width="34%" >something here</td>
  </tr>
  <tr>
    <td width="33%" >something here</td>
    <td width="34%" >something here</td>
  </tr>
</table>


Have fun!
In fact, now you have a table with 3 columns (run the code below, I added color to it to clarify it): a red one, a blue one and a black one, and 3 rows.

The first column in the table has a rowspan=3, so it will display down over 3 rows. This means that you do not have to enter this column anymore in the following 2 rows of your table. That's why the following 2 rows have only 2 columns (blue and black).

The first column itself contains 4 tables (grey colored).

Hope this clarifies it a bit!
And here's the code (sorry, I forgot...)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>

<table width="100%">
  <tr>
    <td width="33%" rowspan="3" style="border: 1px solid red;">
         <table  width="100%" style="border: 1px solid #bbbbbb;">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%" style="border: 1px solid #cccccc;">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%" style="border: 1px solid #dddddd;">
         <tr>
           <td>{contents}</td>
         </tr>
       </table>
       <table  width="100%" style="border: 1px solid #eeeeee;">
         <tr>
           <td >{contents}</td>
         </tr>
       </table>

      </td>
    <td width="33%" style="border: 1px solid blue;">
            something here
    </td>
    <td width="34%" style="border: 1px solid black;">something here</td>
  </tr>
  <tr>
    <td width="33%" style="border: 1px solid blue;">something here</td>
    <td width="34%" style="border: 1px solid black;">something here</td>
  </tr>
  <tr>
    <td width="33%" style="border: 1px solid blue;">something here</td>
    <td width="34%" style="border: 1px solid black;">something here</td>
  </tr>
</table>

</BODY>
</HTML>
Avatar of seanpowell
Without changing the actual code for the table so that the content rows are coded "before" the something here row (as shown directly above - which you may as well simplify at that point) you can't change where the content gets printed to the screen. More info from you would be required.
Avatar of ethar turky

ASKER

Dear all,
sorry for ambiguous i cuz.
I means load priority for the contents.
Thanks.
So you need the "content" cells to display on screen before the "something here" content does?

How much before, and what type of data do all the table cells contain?
"content" cell contains tables + text + pictures.
what I need is give the "content" highly priority to load and display then "something here" come after.
it's not mater of delay, don't want make any delay... just load the "contents" first and display it b4 the browser download the rest of the page.

That's going to be problematic with your layout.

An example:

<td>Left Cell</td><td>Middle Cell</td><td>RightCell</td>

1. The browser must display the contents of the left cell before the middle one, because it needs to know beforehand exactly where the middle cell will end up. The table cells don't "re-align" themselves as the page is displaying. It's entirely determined beforehand as the browser parses the code.

2. Once the broswer has determined the pixel coordinates for each table cell, it then proceeds to display that cells content. If the content is extensive, it will take longer to display.

So, as another example

<td>Left Cell</td><td>Middle Cell with another table inside it</td><td>RightCell</td>

The Middle Cell content will actually take longer to display - the exact opposite of what you're trying to achieve - because there's more information there.

The only "potential" guarantee is to code the content that you want displayed "before" other content. Like this:

<table>
  <tr>
    <td>This will display first</td>
  </tr>
</table>
<table>
  <tr>
    <td>This will display second</td>
  </tr>
</table>

However, if the first table is a large graphic, and the second table is just text, it probably won't do what you need it to do.

One last question:
Why do you need this to happen - from the user's point of view?
The reasone is very simple , to show up the contents first.
All the customer needs is the contents, when you show it first it will make him wait till the page loaded.
also the "something here" part is menu+advertising and other stuff.
ASKER CERTIFIED SOLUTION
Avatar of seanpowell
seanpowell
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial