Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Read Only Attribute Style Font and Size

Read Only Attribute Style Font and Size

Views: 1,314

Results 1 to 7 of 7
20 Sep 2014, 8:29 PM
#1
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Read Only Attribute Style Font and Size

I have two attributes on one product page.

(i) drop down
(ii) Read only

I want change font size and color for read only attribute. I have checked css and if I change there it will change for all type of attributes.

Anyone know how to just change read only attribute font size and color?
Thanks

20 Sep 2014, 8:46 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Read Only Attribute Style Font and Size

Could be fairly easy or extremely complicated. If the most you would have is two attributes, that would probably be the easiest.
Still, it's probably going to take the renaming of div, ul, or li.
A link to the site would help. Use something like yoursiteDOTcom if you don't want the search engines to pick it up.

20 Sep 2014, 9:14 PM
#3
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Read Only Attribute Style Font and Size

dbltoe:

Could be fairly easy or extremely complicated. If the most you would have is two attributes, that would probably be the easiest.
Still, it's probably going to take the renaming of div, ul, or li.
A link to the site would help. Use something like yoursiteDOTcom if you don't want the search engines to pick it up.

Thank you for your assistance.

I am just using a dummy subdomain on my server for now to show you page.

press dot sjorg dot org

I have attribute assigned drop down only to other products too but I only want to change font size and style for text only.

20 Sep 2014, 10:11 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Read Only Attribute Style Font and Size

Line thirty of the tpl in includes/templates/yourTemplate/templates/tpl_modules_attributes.php is the beginning of the attributes listing. It's provided by a for loop starting on line 20.
You might try adding an if in> <div class="wrapperAttribsOptions">

<h4 class="optionName back"><?php echo $options_name[$i]; ?></h4> <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div> <br class="clearBoth" /> </div>before the> <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>that's what determines the the stylesheet settings for the $options_menu.

Something that would tell the system to use> <div class="specialback"><?php echo "\n" . $options_menu[$i]; ?></div>if the $options_menu was SOME_VALUE else> <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>if it was not.
This would only use .specialback IF the one option is used. That would be addressed in the stylesheet.
Still not sure what will happen to the defined area but, hopefully, that will get you in the right area.

21 Sep 2014, 1:30 PM
#5
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Read Only Attribute Style Font and Size

dbltoe:

Line thirty of the tpl in includes/templates/yourTemplate/templates/tpl_modules_attributes.php is the beginning of the attributes listing. It's provided by a for loop starting on line 20.
You might try adding an if inbefore thethat's what determines the the stylesheet settings for the $options_menu.
Something that would tell the system to useif the $options_menu was SOME_VALUE elseif it was not.
This would only use .specialback IF the one option is used. That would be addressed in the stylesheet.
Still not sure what will happen to the defined area but, hopefully, that will get you in the right area.

Thank you! If I put ```

<div class="specialback"><?php echo "\n" . $options_menu[$i]; ?></div> ``` will not this effect all type of attributes instead of just read only as it does not have specific for read only.

I found following code

.wrapperAttribsOptions select {
font-size: 20px;
}

.wrapperAttribsOptions label.attribsSelect {
padding-top: 6px;
}

which have specific for drop down.

Do you know for read only?

23 Sep 2014, 2:48 AM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,830
Plugin Contributions:
17

Re: Read Only Attribute Style Font and Size

Perhaps you misread my post. It talks about adding an if - else to the for loop to possibly fix the problem by creating an additional name for the class. If you are not very familiar with the concept, I would echo what you often hear on reality shows. "Don't try this at home."

23 Sep 2014, 12:19 PM
#7
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: Read Only Attribute Style Font and Size

dbltoe:

Perhaps you misread my post. It talks about adding an if - else to the for loop to possibly fix the problem by creating an additional name for the class. If you are not very familiar with the concept, I would echo what you often hear on reality shows. "Don't try this at home."

The reason why I said that because I tried something similar and have back1 instead of specialback where back1 was controlled in css but it changed the font size of all attributes option values (drop down and read only) not only read only.

Following code work fine for drop down only

.wrapperAttribsOptions select {
font-size: 20px;
}

.wrapperAttribsOptions label.attribsSelect {
padding-top: 6px;
}

Do you know such code for read only?