| | |
TD formatting not showing up in IE7
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2005
Posts: 18
Reputation:
Solved Threads: 0
Hi all. I'm having a problem in that I can't get the table cell text OR the background to center in IE7. Works fine in Mozilla. Text-align is set to left on one of the contianing divs but that doesn't seem to affect it.
CSS
PHP
CSS
HTML and CSS Syntax (Toggle Plain Text)
.browseCategoryImage { background: #FFF url( 'images/browsecategorybg.png' ) no-repeat center center; vertical-align:top; height: 200px; text-align:center; }
PHP
HTML and CSS Syntax (Toggle Plain Text)
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); mm_showMyFileName(__FILE__); $iCol = 1; if( !isset( $categories_per_row )) { $categories_per_row = 3; } $cellwidth = intval( 100 / $categories_per_row ); if( empty( $categories )) { return; // Do nothing, if there are no child categories! } ?> <br/> <table width="100%" cellspacing="0" cellpadding="0"> <?php foreach( $categories as $category ) { if ($iCol == 1) { // this is an indicator wether a row needs to be opened or not echo "<tr> \n"; } ?> <td class="browseCategoryImage" width="<?php echo $cellwidth ?>"> <br /> <a class="browseCategoryTitle" title="<?php echo $category["category_name"] ?> " href="<?php $sess-> purl(URL."index.php?option=com_virtuemart&page=shop.browse&category_id=".$category["category_id"]) ?>"> <?php if ( $category["category_thumb_image"] ) { echo ps_product::image_tag( $category["category_thumb_image"], "alt=\"".$category["category_name"]."\"", 0, "category"); echo "<br /><br/>\n"; } echo $category["category_name"]; echo $category['number_of_products']; ?> </a><br/> </td> <?php // Do we need to close the current row now? if ($iCol == $categories_per_row) { // If the number of products per row has been reached echo "</tr> \n"; $iCol = 1; } else { $iCol++; } } // Do we need a final closing row tag? if (sizeof( $categories ) < $categories_per_row) { echo "</tr>\n"; } ?> </table>
Last edited by arrbug; Sep 24th, 2009 at 7:40 pm.
- Alignment is not inherited from div to table. You need to apply the style to the td tags.
- The php script may be overriding the style.
- If there is any syntax error in the style, the entire style becomes invalid in some browsers. You have syntax errors, because you have attributes without parameters in the background style.
Wrong:
no-repeat
Right:
background-repeat="no-repeat"
- The php script may be overriding the style.
- If there is any syntax error in the style, the entire style becomes invalid in some browsers. You have syntax errors, because you have attributes without parameters in the background style.
Wrong:
no-repeat
Right:
background-repeat="no-repeat"
Daylight-saving time uses more gasoline
•
•
•
•
- Alignment is not inherited from div to table. You need to apply the style to the td tags.
- The php script may be overriding the style.
- If there is any syntax error in the style, the entire style becomes invalid in some browsers. You have syntax errors, because you have attributes without parameters in the background style.
Wrong:
no-repeat
Right:
background-repeat="no-repeat"
There's nothing wrong with his shorthand background css statement:
background: #FFF url( 'images/browsecategorybg.png' ) no-repeat center center; In fact it is absolutely correct and how shorthand background statements work.But, there is more than one error in your sugestion:
cite:
background-repeat="no-repeat" 1. The "=" mark is not allowed as css property/value delimiter;
2. the (") quotation marks in the property value, neither.
This syntax is not allowed on html element inline style attribute declarations, either.
Last edited by Troy III; Sep 27th, 2009 at 10:30 am.
![]() |
Similar Threads
- search redirect virus - **need help ** - HIJACKTHIS LOG ATTACHED. (Viruses, Spyware and other Nasties)
- IE7..... (Web Browsers)
- CSS formatting not showing when uploaded (HTML and CSS)
- Problems in Ie7 after a window resize (HTML and CSS)
- links don't work in IE7 for top half of the page (HTML and CSS)
- External HDD Formatting Problem (IT Professionals' Lounge)
- Navbar Transparency Issue (JavaScript / DHTML / AJAX)
Other Threads in the HTML and CSS Forum
- Previous Thread: CSS Floating menu makes page jump to left only on certain pages
- Next Thread: Pure CSS Image Gallery with mouse-click swap
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






