Help - Search - Members - Calendar
Full Version: If You're A Monster, Come Here
MonsterSmallBusiness Forums > MonsterCommerce > How do I?
nooksandniches
Why can't I customize this font on my site? (example below) For some reason ya'll put an absolute font style on this particular piece of code in the asp page and it does not match the rest of the fonts on my site. Can this be changed?

user posted image
nooksandniches
Should this be in the "Design Aspects" forum?
edc
I was thinking it should be in the "Ask a monstersmile.gif" forum...and right after they answer, it will belong in the "Feature Request" area.
jGirlyGirl1
QUOTE(nooksandniches @ Apr 27 2005, 05:55 PM)
user posted image
[right][snapback]75416[/snapback][/right]

Can you post the source code for this part? It might help to see what style class monstersmile.gif has applied to it. happy.gif
nooksandniches
Here's the code:

CODE
<p style="margin-top: 0; margin-bottom: 0">
     <font face="Arial" style="font-size: 9pt" class="CheckoutBody">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Customizations: No Gift Wrap</font></p>
   <p style="margin-top: 0; margin-bottom: 0">
           <font face="Arial" style="font-size: 9pt" class="CheckoutBody"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Details:&nbsp;</b>jimmy's favorites | 100% cotton</font></p><hr>
TNTGram
What is the class, "CheckoutBody"? Is that something you put in or MC? I don't see anything like that in your style or custom css sheets.
nooksandniches
nope nothing I put in. I can't find it on my custom.css or style.css page. Hmmm.

Anybody else's like this? I'm thinking that the class makes no difference, it is taking on the font face tag. Anybody know?
jGirlyGirl1
QUOTE(nooksandniches @ Apr 27 2005, 08:55 PM)
Here's the code:

CODE
<p style="margin-top: 0; margin-bottom: 0">
     <font face="Arial" style="font-size: 9pt" class="CheckoutBody">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Customizations: No Gift Wrap</font></p>
   <p style="margin-top: 0; margin-bottom: 0">
           <font face="Arial" style="font-size: 9pt" class="CheckoutBody"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Details:&nbsp;</b>jimmy's favorites | 100% cotton</font></p><hr>

[right][snapback]75461[/snapback][/right]

I just checked this out and looked at your style.css and custom.css files. Neither one of them has a CheckoutBody style. Maybe this is something new????

Anyway, bad news... Unfortunately the CSS is coded directly into the HTML as Arial 9pt. So, unless monstersmile.gif gets rid of it, makes a style for it, and puts it in the Site wide color and font options, it can't be changed.

I'd like to ask monstersmile.gif why????

WHY DO YOU APPLY CSS STYLES DIRECTLY IN THE HTML CODE??? IT MAKES NO SENSE AND IT'S VERY FRUSTRATING BECAUSE TO MAINTAIN A CLEAN AND PROFESSIONAL LOOK IT FORCES THE MERCHANT TO ADHERE TO monstersmile.gif'S STYLE!

Sorry for the rant, but it really irks me.
nooksandniches
that's my exact rant jgirly! They do this in a couple of places and I wish they wouldn't.
TNTGram
Why not put ".checkoutBody" in your custom css and style it the way you want? I'd at least try (then later see if it messes up anything else).
jGirlyGirl1
QUOTE(TNTGram @ Apr 28 2005, 01:58 AM)
Why not put ".checkoutBody" in your custom css and style it the way you want?  I'd at least try (then later see if it messes up anything else).
[right][snapback]75507[/snapback][/right]


Because unfortunately you can't override properties with CSS that are worked into the code.

Example: Let's say I want to set the margins for all occurrences of <P> tags to 2px. I would put this is my custom.css file:

p {margin: 2px;}

The browser would load:
1- style.css, then
2- custom.css, then
3- HTML

Since the HTML loads last, and has CSS in it (<p style="margin-top: 0; margin-bottom: 0">) it will override all of my CSS.

The same exact thing goes for the <font> tag, so even if you make a style called "CheckoutBody" this part will override it. (<font face="Arial" style="font-size: 9pt" )

CODE
<p style="margin-top: 0; margin-bottom: 0">
    <font face="Arial" style="font-size: 9pt" class="CheckoutBody">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Customizations: No Gift Wrap</font></p>

Does that make sense?


TNTGram
Thanks for explaining, jGirl. I use the "try & see & wonder why" technique! I try things, see if it works then I wonder why it doesn't work! LOL

But yes, what you're saying makes sense. In that case, I join the RANT.
jGirlyGirl1
QUOTE(TNTGram @ Apr 28 2005, 09:33 AM)
Thanks for explaining, jGirl.  I use the "try & see & wonder why" technique! I try things, see if it works then I wonder why it doesn't work! LOL

But yes, what you're saying makes sense.  In that case, I join the RANT.
[right][snapback]75525[/snapback][/right]

LOL! Welcome to the Rant. Ha ha.

If only monstersmile.gif would respond...
undejj
GirlyGirl is right. When a style is explicitly specified in the HTML code, it supercedes the styles in your style sheets.

Thank goodness we have DHTML, which allows elements on a page to change at any time.

Place this script in your Bottom of Page and adjust the font values accordingly:
CODE
<script language=javascript>
j=document.getElementsByTagName('font');
for(i=0; i<j.length; i++)
{
    if (j[i].className=='CheckoutBody')
    {
         j[i].style.fontFamily='Times';
         j[i].style.fontSize='60';
    }
}
</script>

I tested in IE6 and Firefox and it works in both.

Keep in mind that this script will modify the font styles for any element that is a member of the CheckoutBody class. If that becomes a problem, then further modification of the script will be in order.

Hope this helps! happy.gif
AzAkers
Way to go undejj!!
jGirlyGirl1
Cool! Thanks Undejj happy.gif I guess after learning Javascript, DHTML will be next!

Can I be so bold as to ask how we could accomplish this if the CheckoutBody class wasn't there? So, say there's no class and we are using a function call... Could we put the function call in a div tag, give the div tag an ID and use the same script??

Thanks so much for this!

QUOTE(undejj @ Apr 28 2005, 02:46 PM)
GirlyGirl is right. When a style is explicitly specified in the HTML code, it supercedes the styles in your style sheets.

Thank goodness we have DHTML, which allows elements on a page to change at any time.

Place this script in your Bottom of Page and adjust the font values accordingly:
CODE
<script language=javascript>
j=document.getElementsByTagName('font');
for(i=0; i<j.length; i++)
{
    if (j[i].className=='CheckoutBody')
    {
         j[i].style.fontFamily='Times';
         j[i].style.fontSize='60';
    }
}
</script>

I tested in IE6 and Firefox and it works in both.

Keep in mind that this script will modify the font styles for any element that is a member of the CheckoutBody class. If that becomes a problem, then further modification of the script will be in order.

Hope this helps! happy.gif
[right][snapback]75563[/snapback][/right]

nooksandniches
Wow! thanks Undejj! I really appreciate it.
crashingflwrgrl
All hail Undejj! We're not worthy...we're not worthy....lol wink.gif
undejj
QUOTE(jGirlyGirl1 @ Apr 28 2005, 01:54 PM)
Can I be so bold as to ask how we could accomplish this if the CheckoutBody class wasn't there?  So, say there's no class and we are using a function call... Could we put the function call in a div tag, give the div tag an ID and use the same script?? 

There are several ways to accomplish the same thing (some better and more efficient than others). Technically, you could put the function inside a div tag. Just remember, the function writes HTML tags, and those are the tags that you will probably want to target.

For example, let's say you have this:

CODE
<div id="one">
    <% someaspfunctioncall %>
</div>

That may translate to this:

CODE
<div id="one">
    <table>
         <tr><td>
              <p>Hello World!
         </td></tr>
    </table>
</div>

.. in which case, assigning a style to the div tag would do you absolutely no good. So you might have to crack the books and learn some fancy JavaScript to do as you asked.

Or you could just use something like this, which works the same magic on nooksandniches original code, and does it with no reference to the class:

CODE
<script language=javascript>
j=document.getElementsByTagName('font');
for(i=0; i<j.length; i++)
{
    if (j[i].innerHTML.match (/Customizations:|Details:/))
    {
         j[i].style.fontFamily='Times';
         j[i].style.fontSize='60';
    }
}
</script>

wink.gif
jGirlyGirl1
Thanks so much for explaining! It's a big help and I really appreciate it.
clap.gif
undejj
Any time .. grin.gif
undejj
I just thought of a better way to do this:

CODE
<script language=javascript>
j=document.getElementsByTagName('font');
for(i=0; i<j.length; i++)
{
   if (j[i].className=='CheckoutBody')
        j[i].className='OneOfYourOtherClassNames';
}
</script>

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.