Webmaster Key - Discussion Forums


Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2012, 04:20:30 AM

Login with username, password and session length
Welceome to Forums!

Important information for guests and new members:

In order to understand the full benefits of becoming an active member of this forum, please review the following information on guest and new member restrictions. These forum changes have been prompted by an overwhelming and unreasonable amount of bot postings and incoherent guest spam messages. We wish to prevent these events from happening in the future and make our community a more comfortable place for all of our members.

For guests:

Guests are not allowed to open new topics, polls, or posts attachments.
If you wish to open up new discussions on this forum, we encourage you to register.

For new members:

New members with less than five posts are not allowed to modify additional profile information such as avatars, contact information, biographies, and signatures. However, new members are encouraged to post their own topics or reply to topics initiated by other members. Become active on the forums and 5 posts should be an easy task!

We are a diverse community with members from all over the world. We encourage new ideas and interesting conversation. Do not be afraid to post webmaster/computer-related questions or problems, as our active members are always willing to help when they are able. Interested? Join us.

+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ CSS controlled font sizes
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print
Author Topic: CSS controlled font sizes  (Read 1664 times)
gilamo
Limited Member

Posts: 6


« on: November 21, 2006, 08:39:21 AM »

I want to eliminate all the font tags in my html and set them in CSS.  I know how to do heading tags, but I want to know how to replace the "strong", "small", and "big" commands and put them into an external style sheet. (?)  Thanks in advance!
The KerrBear
Report to moderator   Logged
SensoVision
Administrator
Veteran
*****
Posts: 5 857


I'm proud user of Debian GNU/Linux OS


WWW
« Reply #1 on: November 23, 2006, 12:13:26 AM »

Hi Gilamo, I don't know any straightforward way to replace these tags, but if I had to use such tags I would use following font properties, check out this sample HTML code:
Code:
plain text<br />
<big>big</big> / <bg style="font-size: 115%; ">big style</bg><br />
<strong>strong</strong> / <stg style="font-weight: bold; ">strong style</stg><br />
<small>small</small> / <sml style="font-size: 85%; ">small style</sml>

At least in my browser text sized by tags and style sheet is same.
Regarding your second question you can do it in several ways, I personally would create a tag in external CSS stylesheet and would use this tag in page, like this:

Code: (example.css)
bg {font-size: 115%;}
stg {font-weight: bold;}
sml {font-size: 85%;}


Code: (example.html)
<html>
<head>
</head>
<body>

<link rel="stylesheet" type="text/css" href="example.css" >
plain text<br />
<big>big</big> / <bg>big style</bg><br />
<strong>strong</strong> / <stg>strong style</stg><br />
<small>small</small> / <sml>small style</sml>
</body>
<html>

Let me know if it's what you were looking for.
Report to moderator   Logged

Denis
gilamo
Limited Member

Posts: 6


« Reply #2 on: November 25, 2006, 05:26:40 PM »

I used <span> instead.  I used this in the external style sheet:

span.small { font-family: TimesNewRoman,sans-serif;
      font-size: 10px;
      font-weight: normal; }
span.strong { font-family: TimesNewRoman,sans-serif;
      font-size: 16px;
      font-weight: bold; }
span.big { font-family: TimesNewRoman,sans-serif;
      font-size: 18px;
      font-weight: bold; }

I used this in the html code on the page:

<span class="small">small text</span>

It validates and works well.  Thank you for the alternative suggestion!
Gilamo
Report to moderator   Logged
Pages: [1] Go Up Stumble Upon! Digg It! del.icio.us! Add to Technorati! ReddIt!  Send this topic Print 
+ Webmaster Key Forums
|-+ Webmaster Corner
| |-+ Site Design and Web Authoring
| | |-+ CSS controlled font sizes

Jump to:  
« previous next »


Our Partners
RelmaxTOP Ranking System Web Hosting RelmaxTOP Ranking System
Staff Sites
12Noon[12Noon Gallery] Andy[Urgentclick]
Tamuril[Tamuril's Digital Art Exhibit] Sensovision
Powered by MySQL Powered by PHP We are hosted by Relmax Inc. |Our Privacy Policy | Sitemap
Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Forum design by Tamuril © 2005.
Valid XHTML 1.0! Valid CSS!