Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Changing font size

Posted by: jfpan Mar 29 2012, 11:12 AM

Greetings. I'm trying to alter the font size of some text in the Contact Us section of our online store. The font size apparently is generically set for certain aspects of the site, so I have been told by the hosting company that I have to change the font size in the specific location of the text. I only have a sub-rudimentary familiarity with html. The current line of code is as follows:

<td class="titles" height="35"><b>[store_name]</b></td>

I want to change the size of the store_name, so I changed the code to the following:
<td class="titles" height="35"><b><style="font-size:25px;">[store_name]</b></td>

The store name size didn't change at all, so obviously I'm doing something wrong. I may be a prime example of "a little knowledge can be dangerous". Anything that can be suggested to solve the problem would really be appreciated.

Thanks.

Posted by: Darin McGrew Mar 29 2012, 11:17 AM

The style attribute needs to be part of some other tag. You can't just stick it in <brackets> the way you did.

See also:
http://htmlhelp.com/reference/css/style-html.html#inlining

Posted by: jfpan Mar 29 2012, 01:21 PM

QUOTE(Darin McGrew @ Mar 29 2012, 12:17 PM) *

The style attribute needs to be part of some other tag. You can't just stick it in <brackets> the way you did.

See also:
http://htmlhelp.com/reference/css/style-html.html#inlining


Would you know where that other tag might be located, and what it might look like?

Posted by: pandy Mar 29 2012, 02:41 PM

If you want it to be valid for all text in the TD, use it with that TD.

Posted by: jfpan Mar 29 2012, 04:53 PM

QUOTE(pandy @ Mar 29 2012, 03:41 PM) *

If you want it to be valid for all text in the TD, use it with that TD.

Bear with me, because I'm teaching myself and am really new at this. And if this is not a forum for beginners, please let me know. The only text in that particular TD line is the store name. Where else in that TD line would I place the style attributes if not in front of the store name? Thanks for your assistance and patience.

Posted by: pandy Mar 29 2012, 05:25 PM

Sure the forum is for beginners.

All attributes goes in the start tag, so does the style attribute. You just list it with the others, separated by space.

HTML
<td class="titles" height="35" style="font-size: 25px">


If you want, you can remove the B too and use the CSS equivalent.
HTML
<td class="titles" height="35" style="font-size: 25px; font-weight: bold">
[store_name]
</td>


This may seem pretty pointless, but sooner or later you will move to external style sheets and then it will make more sense and leave your HTML uncluttered.

Posted by: jfpan Mar 30 2012, 02:18 PM

QUOTE(pandy @ Mar 29 2012, 06:25 PM) *

Sure the forum is for beginners.

All attributes goes in the start tag, so does the style attribute. You just list it with the others, separated by space.

HTML
<td class="titles" height="35" style="font-size: 25px">


If you want, you can remove the B too and use the CSS equivalent.
HTML
<td class="titles" height="35" style="font-size: 25px; font-weight: bold">
[store_name]
</td>


This may seem pretty pointless, but sooner or later you will move to external style sheets and then it will make more sense and leave your HTML uncluttered.


Thank you. Worked like the proverbial charm.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)