SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    a real newbie question

    Hi. I'm just learning css and am stuck already. I have the properties for my paragraph tags in my linked style sheet which work fine. But how do I specify properties for normal body text not in a paragraph - because using paragraph inserts a gap which I don't want. Hope this makes sense
    <help>StIcKs</help>

  2. #2
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use the <span> tag like this:
    <span class="yourcssclass">Here is the text.</span>

  3. #3
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have in your stylesheet:

    BODY {

    font-family: verdana;
    color: #FFFFFF;

    }

    then anything that appears on your page, that is not contained within other tags (for e.g. <P> or <TD>) then it will show up on the page with these properties.

    Is this what you meant or not?!
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Weirdbeadmt - that is what I meant and had tried but my text was in a <td>. Now I know why it didn't work

    Marina - your idea has worked perfectly. Thanks to you both.
    <help>StIcKs</help>

  5. #5
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just checking, but you know you can do

    <td class="yourclass">

    don't you? this is the one i use the most!

    you can apply it to the whole table as well, and in fact the list goes on quite a while!

    good luck with the CSS. Just give us a yell if you get stuck again!
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  6. #6
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ive found that if you want a font globally on a page, the best thing to do is define the body tag and the table tag
    Code:
    BODY { font-family: verdana; color: #FFFFFF; } 
    TABLE { font-family: verdana; color: #FFFFFF; }

  7. #7
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys for all the replies. Not sure what I've done but now my page is a complete disaster in Netscape Am going to start again and no doubt I'll be back pleading for help.
    <help>StIcKs</help>

  8. #8
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh no I'm back
    I started again and now my page is not quite such a disaster but Netscape doesn't seem to be reading my <span class> properties from my style sheet. Because of this it puts the page out of alignment. Is <span> not Netscape compatible?

    If someone doesn't mind having a quick look the page is at http://www.peria.school.nz and the style sheet is on the site - school.css

    Thanks again.
    <help>StIcKs</help>

  9. #9
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey sticks,

    Thanks for the link. It is always easier to advise when being able to look at the problem!

    Anyway I checked in IE5 and NS6, and I'm afraid, they both looked as good as each other! I couldn't spot much difference between the two, except that the colours in the logos dont quite match up in NS (fine in IE). (1024x768, Win98 16 Bit)

    I took a look at your stylesheet as well, and that looked fine too. The only thing I would mention is adding more fonts in your font-family tags, on the offchance that someone views without verdana. they would then be left with system defaults, normally Times New Roman.

    Good work though!
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  10. #10
    Bimbo With A Brain! silver trophy Saz's Avatar
    Join Date
    Mar 2001
    Location
    Kent, United Kingdom
    Posts
    5,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    At the risk of repeating myself as I've mentioned this program soooooooooo many times since TheOriginalH told me about it.........

    You can download a program called Topstyle, made by a company called Bradsoft. It's a brilliant CSS editor and has a validator included with it. It will check through your style sheet and validate it against different browsers so you can see at a glance which styles won't work. I love this program and use it a hell of a lot.

    The version you download is nagware, so you get messages come up reminding you to purchase it, but at under $50, buying it would be money well spent.
    Saz: Naturally Blonde, Naturally Dizzy!
    No longer Editor of the Community Crier.

    Don't mind me, I'm having a BLONDE moment!

  11. #11
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    weirdbeardmt - afraid?? You had me worried there for a minute. Thanks heaps for having a look. It must be my version of Netscape which is old - 4.03

    Saz - thanks for the tip and I'll follow your advice.

    Now on to the rest of the pages.
    <help>StIcKs</help>

  12. #12
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    topstyle is a great program! i got it free with homesite and its great, i really suggest you download it

  13. #13
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by StIcKs
    weirdbeardmt - afraid?? You had me worried there for a minute. Thanks heaps for having a look
    That was my intention!! Sorry, it was a bit mean!

    Older versions of NS are less tolerant (esp. 4.7) so that might well be your problem. In NS6 everything looked good (except the logo colours not matching...)
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky


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
  •