X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Hints & Tips: No Questions, Just Answers Here!!! (https://forum.x-cart.com/showthread.php?t=21885)

girlsbits 05-18-2006 09:54 AM

Hints & Tips: No Questions, Just Answers Here!!!
 
Hi,

I've been with XC for little over a week now and I'm amazed by the number of times the same question has been asked over and over and over...

That aside, I had a (tiny!) little problem with my storefront layout last night and was about to make a post when I decided I'd try to work it out for myself first. It might sound simple to some, but I couldn't get my 4-per-row category thumbnail images to line up horizontally if the product names were all of differing lengths. Once I'd worked this simple solution out, I had an idea to start a "Hints & Tips" section with answers only, no questions, sort of like Boomers "Most Asked Questions". I'd like to make a start on this and hope others join in the conga!!!

girlsbits 05-18-2006 10:04 AM

Aligning Category Page Thumbnail Images
 
To horizontally align thumbnail images on your category pages when using the "Display products list in multiple columns" feature and when each product name is of a different length, simply add the "nowrap" tag to the table holding the images on the products_t.tpl:

START CODE

<TD width="{$width}%" align="center" valign="top" nowrap="nowrap" class="DialogBox">

END CODE

balinor 05-18-2006 10:07 AM

That is indeed what the thread by Shan is for in the FAQ forum, and the FAQ forum in general. If you have a suggestion for the thread, PM it to Shan and he'll add it. Let's not start a duplicate thread.

If the 'trick' is a modification, post it in the Custom Mods forum. Thanks :)

girlsbits 05-18-2006 10:14 AM

Done!

Jon 05-18-2006 01:15 PM

Thanks for sharing your experiences, it's always great when people take the time to give back to the community.

Just a note, I believe the correct html usage is:

Code:

<TD width="{$width}%" align="center" valign="top" nowrap class="DialogBox">

:)

Alltribes 07-10-2006 07:37 AM

Nope, the correct usage is nowrap="nowrap". Either will work but it won't validate if you just use nowrap.

TelaFirma 07-11-2006 04:01 AM

Quote:

Originally Posted by Alltribes
Nope, the correct usage is nowrap="nowrap". Either will work but it won't validate if you just use nowrap.


The correct usage is simply nowrap. It does not validate probably due to your doctype declaration. That attribute is now depreciated.

Quote:

Originally Posted by W3C
nowrap [CI]
Deprecated. When present, this boolean attribute tells visual user agents to disable automatic text wrapping for this cell. Style sheets should be used instead of this attribute to achieve wrapping effects. Note. if used carelessly, this attribute may result in excessively wide cells.


The reason that you are able to get it to validate using nowrap="nowrap" is because certain validators will allow non-standard atributes as long as they have a value and have quotes around the value. So for instance I could use:

smell="bad"
or
hair="nappy"

and they would still "validate" because the syntax is legal. It does not mean that they are proper HTML tag attributes.


All times are GMT -8. The time now is 12:33 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.