dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: text size control between browsers???? HTML Question

  1. #1
    Member
    Join Date
    Nov 2000
    Posts
    55
    Hello-

    I'm sure there's someone out there who's asked this before but I couldn't find any relevant posts.

    I was hoping someone could direct me to a good tutorial with information on how to control text display sizes across ie and netscape, and mac and pc computers.

    I've tried using the px way, but that doesn't seem to work. CSS seem to be the way to go, but every tutorial on CSS I've read confuses me more. If anyone has any info of any kind please let me know. I will be eternally grateful.

    Right now i'm going crazy because i did a site on a pc using explorer to browse it. In netscape, all the fonts sizes get really small and it screws up the design. Ahhhhh.


  2. #2
    Senior Member flipsideguy's Avatar
    Join Date
    Dec 2000
    Location
    Sweden
    Posts
    834
    You're right, Style Sheets are the best way to make sure that text renders the same size on both NS and IE.

    Exmaple:

    Code:
    p {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; line-height: normal; color: #333333}
    
    a {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #336699; text-decoration: none}
    
    a:hover {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: normal; color: #FFCC00; text-decoration: underline}
    
    a:active {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #3366FF; text-decoration: underline}
    
    a:visited {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #003366}
    Open Notepad, type/paste in the code and save as (All Files) stylsesheet.css

    Now in all the html pages type in:
    Code:
    <link rel="stylesheet" href="stylesheet.css" type="text/css">
    The stylesheet above makes all paragraph ( < p > ) and link ( < a > ) tags the font/size/color specified. Make sure that your type is set to paragraph

    There is a lot more you can do with css than just this. You can define your own custom styles (.mycustom {font/color/size/} and then apply them to a tag in the html by using class="mycustom" within the open tag
    Example:
    Code:
    < p class="mycustom" > whatever text you may have here < /p >
    Hope this helped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center