D_Blackwell

msg:3742294 | 8:48 pm on Sep 10, 2008 (gmt 0) |
Can you supply a CSS/HTML code sample that replicates the issue? I'm not understanding the reference and difference between 'collapse' and 'maintain its width.? Could it be, in this case, as simple as: <li> </li> just to put something in the container?
|
matthewamzn

msg:3742313 | 9:17 pm on Sep 10, 2008 (gmt 0) |
I'm querying my database and there isn't always a result found. When there isn't a result I can't get CSS to keep the width. .list1_origin { width:60px; display:block; float:left; overflow:hidden; } <li class="list1_origin">(result from database)</li>
|
D_Blackwell

msg:3742416 | 1:38 am on Sep 11, 2008 (gmt 0) |
Outside of my area, but can you handle it from that side? IF - no result found - THEN - and insert some sort of default 'place holder' which would provide the width?
|
lighting

msg:3742470 | 3:59 am on Sep 11, 2008 (gmt 0) |
set a "line-height" in your style
|
matthewamzn

msg:3742481 | 4:42 am on Sep 11, 2008 (gmt 0) |
I ended up adding a function. I guess css has to have something between the tags in order to set the width. .list1_origin { width:60px; display:block; float:left; overflow:hidden; } function no_result_space($value) { if (!isset($value)) { echo " "; } else { return $value; } } <li class="list1_origin">no_result_space(some_value)</li>
|
alt131

msg:3742491 | 5:36 am on Sep 11, 2008 (gmt 0) |
matthewamzn - just missed you! From a usability perspective, my first was with D_Blackwell - provide some indication the cell is intentionally "blank". (Although that may be obvious from the other data being displayed.) Otherwise, simple height should do it. As in height:30px - whatever measurement will apear similar to the visual "line-height" of the <li>'s with content.
|
sgietz

msg:3742708 | 1:17 pm on Sep 11, 2008 (gmt 0) |
May I ask why you want to display empty results? :)
|
|