WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Setting a line between rows, Manel, February 12, 2004
     Re:Setting a line between rows, Erik Arvidsson, February 18, 2004
     Re:Setting a line between rows, Guilherme Blanco, February 15, 2004

Subject: Re:Setting a line between rows From: Guilherme Blanco Date: February 15, 2004

You can do a trick in it.
When you're creating the lines via DOM, add a new line after the line of content, with height="1" and set its background to the color you want.

Here is one example:

dcError.print = function( oError ) {
  if( parent.frames["console"] ) {
    var oTable = parent.frames["console"].document.getElementById( "errorSpace" );

    var oLine = oTable.insertRow( oTable.rows.length ); // Mozilla needs the parameter
    var oCell = oLine.insertCell( -1 );
    oCell.className = "displayText";

    var indexer = oError._file.lastIndexOf( "/" );
    if( indexer < 7 ) indexer = oError._file.lastIndexOf( "\\" ) + 1;

    var str = "Error #<span class=\"highText\">" + oError._number + "</span><br /><br />\n"
    + "File: <span class=\"highText\">" + oError._file.substr( indexer ) + "</span><br />"
    + "Line <span class=\"highText\">" + oError._line + "</span><br />\n"
    + "Desc.: <span class=\"highText\">" + oError._message + "</span><br />\n";
    oCell.innerHTML = str;

    var oLine = oTable.insertRow( oTable.rows.length ); // Mozilla needs the parameter
    var oCell = oLine.insertCell( -1 );
    oCell.className = "separator";

    parent.frames["console"].debug.open();
    parent.frames["console"].fixSizes();
  } else alert( "Error #" + oError._number + "\n\nMessage: " + oError._message + "\nFile: " + oError._file + "\nLine: " + oError._line );
}

Check out that after I create the content line (tomato color), I create another line (dodgerblue color). This is for the "line", exactly what you want.


Or... you can do another thing, more simple, and will work too.
For empty lines, add a simple space to them (&nbsp;). This will "add content" and the border-bottom will appear.


I hope this helps.

[]s,




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX