SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: css question

  1. #1
    SitePoint Addict isuru's Avatar
    Join Date
    Nov 2000
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to make all normal text appearing on a page have the same format, it doesn't matter whether it is inside <b> tags or <i> tags or whatever, as long as it is not in <a> tags I want it to have a certain font and font size how would I do this?

    i tried using:

    .text {whatever}

    but it didn't work

    PS I've already created the page and I don't want to use CSS classes because then I have to go thorugh the whole page and assign class="whatever" to their tags

  2. #2
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    In the tutorial by Kevin, there is a part about the use of the $string = htmlspecialchars();

    maybe that could help. A similar description is also on page 143 of beginning php4, published by WROX.

    peace

  3. #3
    SitePoint Member
    Join Date
    Jan 2001
    Location
    Mukilteo WA
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try:

    <style>

    body
    {
    font: normal 12px/12px verdana, arial, san serif;
    }

    </style>

    Not positive, but I believe in-line HTML styles such as <b></b>, <i></i> will override the CSS properties though.


  4. #4
    SitePoint Zealot cckrocks's Avatar
    Join Date
    Nov 2000
    Location
    A home in the hills where the grass grows green an
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Inline tags will not override. The tags that WILL override, however are block tags. This means you could specify a font family for <body> and when you put text inside of a table it wouldn't be displayed properly unless you specified, for example, that font for <table> or <td> or <tr>.
    Think beyond what is common...
    www.jaggedknife.com
    www.fusion-in.com

  5. #5
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay.

    Since you odn't want to makeany modifications,
    you go to do this:

    <style type="text/css">
    <!--
    body,td,p,a { font-family: Verdana, Arial; font-size: 10pt; }
    -->
    </style>

    If you want to add more tags, just add it with the body,td,p,a code.

    That way, all will have that style.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


Bookmarks

Posting Permissions

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