XHTML & CSS table - works on FF but not on IE

Discussion in 'HTML & Website Design' started by ophir.oren, Jan 17, 2007.

  1. #1
    I'm trying to create a table in XHTML & CSS.
    The problem is that when I test it on Firefox it works but on IE it doesn't.
    on FF I see the table ok (1 row with 3 items on it - 2nd row only 1 item), but on IE I see the items one under the other. I've attached snapshots to demonstrate what I mean.

    here is the code:
    HTML:
    
    <div id="categoryContainer"><div class="categoryRow">
    					<div class="categoryCell">
    						<a href="university.aspx?u=118" style="text-decoration: none;">
    
    						<img src="UserFiles/110120071311398.jpg" alt="האוניברסיטה הפתוחה" />
    						<br />
    						<span style="font-size: 10px;">האוניברסיטה הפתוחה</span>
    						</a>
    					</div>
    				
    					<div class="categoryCell">
    						<a href="university.aspx?u=117" style="text-decoration: none;">
    						<img src="UserFiles/110120071311098.jpg" alt="המכללה למינהל" />
    
    						<br />
    						<span style="font-size: 10px;">המכללה למינהל</span>
    						</a>
    					</div>
    				
    					<div class="categoryCell">
    						<a href="university.aspx?u=119" style="text-decoration: none;">
    						<img src="UserFiles/110120071312275.jpg" alt="המכללה האקדמיץ תא-יפו" />
    						<br />
    
    						<span style="font-size: 10px;">המכללה האקדמיץ ת"א-יפו</span>
    						</a>
    					</div>
    				</div></div>
    				</div>
    
    Code (markup):

    CSS:
    
    div#categoryContainer
    {
    	display: table;
    	width: 400px;
    	text-align: center;
    }
    
    .categoryRow
    {
    	display: table-row;
    }
    
    .categoryCell
    {
    	display: table-cell;
    	padding-top: 20px;
    }
    
    h1#pageTitle
    {
    	font-size: 18px;
    }
    
    Code (markup):
     

    Attached Files:

    • FF.jpg
      FF.jpg
      File size:
      15.6 KB
      Views:
      73
    • IE.jpg
      IE.jpg
      File size:
      11.7 KB
      Views:
      76
    ophir.oren, Jan 17, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    IE does not grok {display: table*}. You're going to need to use floats, or if a table structure is called for, a table.

    cheers,

    gary
     
    kk5st, Jan 17, 2007 IP
  3. ophir.oren

    ophir.oren Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    bummer!!!!! damn IE :eek:
     
    ophir.oren, Jan 18, 2007 IP
    kk5st likes this.
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Tables are only bad when you are using them for layout. If you have tabular data, then a table's perfect for the job - after all, that's what it's there for :).
     
    Dan Schulz, Jan 18, 2007 IP