www.webdeveloper.com
Results 1 to 4 of 4

Thread: Text wont display in editor using css.

  1. #1
    Join Date
    Apr 2012
    Posts
    110

    Text wont display in editor using css.

    Hi, I put this code in. The text wont display. Their is a black background which worked using css and an image on left side, although the image worked with html, and image made from graphics program is on the right side, also wouldnt work in css, even though I used the css wizard in the editor and tried putting handwritten code in.
    Now the text wont work at all in css. I put in the following:
    .h1 {
    text-align="center"
    font-size="1"
    font-color="#FFFF00";
    font-family=":@FangSong,cursive;
    font-weight:bold;
    font-style:normal;
    text-decoration: none;
    font-size: 24pt;
    font-variant: normal;
    }

    Then under the <body> tag in html, I put in <h1>DISCLAIMER</h1>

    Also tried putting in <div id="h1">DISCLAIMER</h1>

    Nothing works.

    Im using coffee cup editor.

    Boot!, thanks for the other day, sorry I havent got back to say thank you.

  2. #2
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Post link to actual page.
    EfV

  3. #3
    Join Date
    Jan 2004
    Location
    Sweden
    Posts
    850
    Quote Originally Posted by wildguy2 View Post
    I put in the following:
    .h1 {
    text-align="center"
    font-size="1"
    font-color="#FFFF00";
    font-family=":@FangSong,cursive;
    font-weight:bold;
    font-style:normal;
    text-decoration: none;
    font-size: 24pt;
    font-variant: normal;
    }

    Then under the <body> tag in html, I put in <h1>DISCLAIMER</h1>

    Also tried putting in <div id="h1">DISCLAIMER</h1>

    Nothing works.

    Hi

    In the css style you have created a new class (period)h1
    And IDs use hashes #, not period .
    But you do not need to create a new class nor IDs for already existing elements.
    Thatīs the reason why you could not style your H1 element

    If you do need to modify only one element, say H1, on one page. Then you can add a class to it with a proper name and style it differently.
    PHP Code:
    h1.styled {
    font-style:italic;
    }

    <
    h1 class="styled">HEADING</h1
    Otherwise to your original question, just remove the period . in your css and your default H1 element will be styled...

    ---

    a Tip

    You do not actually need the characters " " in your css styling. They only take up more space

  4. #4
    Join Date
    Apr 2012
    Posts
    110

    Thanks very much Siddan,

    Hi ,thanks very much Siddan, I think that helps alot.
    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles