PDA

View Full Version : Help with CSS


dtlyme
07-01-08, 09:10 PM
I think I have been staring at this all too long. If a fresh pair of eyes can help me figure out why I am getting two sets of left/right boders on my page I would sincerely appreciate it!
http://dev.elizab.com/mm5/merchant.mvc?Screen=PROD&Store_Code=EB&Product_Code=giftcert&Category_Code=giftcert_category

Leanne
07-01-08, 10:51 PM
You have two tables that have the class .left-right-border assigned to them.

dtlyme
07-03-08, 04:35 PM
Yes - that I know, but I can't figure out how/where. I have myself a bit confused.

I removed the left/right border from "Product Display" and now it looks like this:
http://dev.elizab.com/mm5/merchant.mvc?Screen=PROD&Store_Code=EB&Product_Code=l-san-henley-mono&Category_Code=SAN

So where are those left/right borders coming from? I just can't figure this out. It's probably right in front of my face . . .

Leanne
07-03-08, 05:11 PM
I probably don't have to tell you you removed the wrong one. Put the border class back on the Product Display, and take a peek in your Product Attribute Layout tab -- I think it's in there. By the way, to get your attribute prompts to display with your html, remove the 'e' from &mvte:attribute:prompt;

dtlyme
07-03-08, 05:20 PM
Leanne - Truly - THANK YOU. I had a complete frustrated mind block on this.

dtlyme
07-03-08, 05:30 PM
Leanne - I won't say one more thing b/c I know I might have more issues. I did as you said and removed the 'e' from within my product attribute template. Maybe I removed the wrong 'e', but it didn't work.

Here is my code - any chance you can highlight it for me?
<table width="100%" border=0 align="center">
<mvt:foreach iterator="attribute" array="attributes">
<input type="hidden" name="Product_Attributes[&mvt:attribute:index;]:code" value="&mvte:attribute:code;">
<mvt:if expr ="l.settings:attribute:template_code NE 0">
<input type="hidden" name="Product_Attributes[&mvt:attribute:index;]:template_code" value="&mvte:attribute:template_code;">
</mvt:if>
<mvt:if expr = "l.settings:attribute:type EQ 'checkbox'">
<tr><td>&nbsp;

</td><td align="left" valign="middle">
<mvt:item name="fonts" param="body_font">
<mvt:if expr = "g.Product_Attributes[l.settings:attribute:index]:value">
<input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" value="Yes" checked>
<mvt:else>
<input type="checkbox" name="Product_Attributes[&mvt:attribute:index;]:value" value="Yes">
</mvt:if>
<mvt:if expr="l.settings:attribute:image">
<img src="&mvte:attribute:image;" alt="&mvte:attribute:prompt;">
<mvt:else>
<mvt:if expr="l.settings:attribute:required">
<b>&mvt:attribute:prompt;</b>
<mvt:else>
&mvt:attribute:prompt;
</mvt:if>
</mvt:if>
</mvt:item>
</td></tr>
<mvt:else>
<tr><td align="left" valign="top">
<mvt:item name="fonts" param="body_font">
<mvt:if expr="l.settings:attribute:image">
<img src="&mvte:attribute:image;" alt="&mvt:attribute:prompt;">
<mvt:else>
<mvt:if expr="l.settings:attribute:required">
<b>&mvt:attribute:prompt;</b>
<mvt:else>
&mvt:attribute:prompt;
</mvt:if>
</mvt:if>
</mvt:item>
</td>
<mvt:if expr="l.settings:attribute:type EQ 'text'">
<td align="left" valign="top">
<mvt:item name="fonts" param="body_font">
<input type="text" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:attribute:value;" size=40>
</mvt:item>
</td>
<mvt:elseif expr="l.settings:attribute:type EQ 'memo'">
<td align="left" valign="top">
<mvt:item name="fonts" param="body_font">
<textarea name="Product_Attributes[&mvt:attribute:index;]:value" rows=10 cols=58 wrap="on">&mvte:attribute:value;</textarea>
</mvt:item>
</td>
<mvt:elseif expr="l.settings:attribute:type EQ 'radio'">
<td align="left" valign="top">
<table border = 0>
<mvt:foreach iterator="option" array="attribute:options">
<tr><td valign = "middle">
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;" checked>
<mvt:else>
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;">
</mvt:if>
</td><td valign = "middle">
<mvt:if expr="l.settings:option:image">
<img src="&mvte:option:image;" alt="&mvte:option:prompt;">
<mvt:else>
<mvt:item name="fonts" param="body_font">
&mvte:option:prompt;
</mvt:item>
</mvt:if>
</td></tr>
</mvt:foreach>
</table>
</td>
<mvt:elseif expr="l.settings:attribute:type EQ 'select'">
<td align="left" valign="top">
<mvt:item name="fonts" param="body_font">
<select name="Product_Attributes[&mvt:attribute:index;]:value">
<mvt:foreach iterator="option" array="attribute:options">
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<option value="&mvte:option:code;" selected>&mvte:option:prompt;</option>
<mvt:else>
<option value="&mvte:option:code;">&mvte:option:prompt;</option>
</mvt:if>
</mvt:foreach>
</select>
</mvt:item>
</td>
</mvt:if>
</tr>
</mvt:if>
</mvt:foreach>
<input type="hidden" name="Product_Attribute_Count" value="&mvte:global:Product_Attribute_Count;">
</table>

Leanne
07-04-08, 12:58 AM
You're using radio buttons so you need to remove it from this piece of the code:


<mvt:elseif expr="l.settings:attribute:type EQ 'radio'">
<td align="left" valign="top">
<table border = 0>
<mvt:foreach iterator="option" array="attribute:options">
<tr><td valign = "middle">
<mvt:if expr="( ( g.Product_Attributes[l.settings:attribute:index]:value EQ 0 ) AND ( l.settings:option:id EQ l.settings:attribute:default_id ) ) OR
( g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code )">
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;" checked>
<mvt:else>
<input type="radio" name="Product_Attributes[&mvt:attribute:index;]:value" value="&mvte:option:code;">
</mvt:if>
</td><td valign = "middle">
<mvt:if expr="l.settings:option:image">
<img src="&mvte:option:image;" alt="&mvte:option:prompt;">
<mvt:else>
<mvt:item name="fonts" param="body_font">
&mvte:option:prompt;
</mvt:item>
</mvt:if>
</td></tr>
</mvt:foreach>
</table>
</td>


FYI, you could just put your images into the image field for the attribute instead of hard coding them into the prompt like that. Then if you want to use the prompt for other things, it won't show up with funky html in it.

dtlyme
07-04-08, 03:21 AM
True - but it frustrates me that it won't allow text in the "prompt" field. So it is just a plain image. I will have to go back and edit the image and add actual descriptive text to the image.

Just seems to be a failing point in Miva still. Although this is all EONS better than the old Miva I have been working with!

Thanks- Have a great July 4th-

-Dana

Leanne
07-04-08, 03:29 AM
Ah, but it does allow both :) Just remove the conditional from around the image / prompt like so:

Change

<mvt:if expr="l.settings:option:image">
<img src="&mvte:option:image;" alt="&mvte:option:prompt;">
<mvt:else>
<mvt:item name="fonts" param="body_font">
&mvte:option:prompt;
</mvt:item>
</mvt:if>


To this

<mvt:if expr="l.settings:option:image">
<img src="&mvte:option:image;" alt="&mvte:option:prompt;">
&nbsp;
</mvt:if>
<mvt:item name="fonts" param="body_font">
&mvte:option:prompt;
</mvt:item>