SitePoint Sponsor

User Tag List

Results 1 to 18 of 18
  1. #1
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Problem with CSS

    I been following Ian Lloyd's book "Build Your Own Web Site..." I'm in Chapter 3 following CSS to add some style. It been going fairly well but I just got blocked.

    I've used this to affect the tagline and turn a sentence into italics, but it does not work:
    #tagline p {
    font-style: italic;
    font-family: Georgia, Times, serif;
    }

    Here's where it fits in style1.css (near bottom)

    /*
    CSS for Bubble Under site
    */

    body {
    font-family: verdana, Helvetica, Arial, sans-serf;
    background-color: #e2edff;
    line-height: 125%
    padding: 15px;
    }
    h1 {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serf;
    font-size: x-large;
    }

    li {
    font-size: small;
    }

    h2 {
    color:blue;
    font-size: medium;
    font-weight: normal;
    }

    p {
    font-size: small;
    color: navy;

    #tagline p {
    font-style: italic;
    font-family: Georgia, Times, serif;
    }
    em {
    text-transform: uppercase;
    }

    I have this link on each page and it has worked for me:
    <link href="style1.css" rel="stylesheet" type="text/css"/>

    Can someone tell me what I am doing wrong. Thanks.

  2. #2
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Middleman View Post
    I been following Ian Lloyd's book "Build Your Own Web Site..." I'm in Chapter 3 following CSS to add some style. It been going fairly well but I just got blocked.

    I've used this to affect the tagline and turn a sentence into italics, but it does not work:
    #tagline p {
    font-style: italic;
    font-family: Georgia, Times, serif;
    }

    Here's where it fits in style1.css (near bottom)

    /*
    CSS for Bubble Under site
    */

    body {
    font-family: verdana, Helvetica, Arial, sans-serf;
    background-color: #e2edff;
    line-height: 125%
    padding: 15px;
    }
    h1 {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serf;
    font-size: x-large;
    }

    li {
    font-size: small;
    }

    h2 {
    color:blue;
    font-size: medium;
    font-weight: normal;
    }

    p {
    font-size: small;
    color: navy;

    #tagline p {
    font-style: italic;
    font-family: Georgia, Times, serif;
    }
    em {
    text-transform: uppercase;
    }

    I have this link on each page and it has worked for me:
    <link href="style1.css" rel="stylesheet" type="text/css"/>

    Can someone tell me what I am doing wrong. Thanks.
    Are you just trying to make text become italic? What are you actually trying to do here?
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  3. #3
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tell exactly what do you want

    btw you may use tag <i></i> instead of css to create italic

  4. #4
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code CSS:
    p {
     font-style:italic;
    }
     
    <p>This is some testing text</p>
    Quote Originally Posted by 2bee View Post
    Tell exactly what do you want

    btw you may use tag <i></i> instead of css to create italic
    The I Element should only be used if theres no other element appropriate to use.
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  5. #5
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply.

    Yes, I am following along with the book and trying to change this sentence in the tagline (in the way recommended) into italics:

    Diving Club for the south-west UK-Lets make a splash!

    The books gives the instruction of exactly how to do it and I am trying to see my mistake while using that. I have gone over it several times but no luck.

  6. #6
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Code:
    p { 
    font-size: small; 
    color: navy;
    
    #tagline p {
    font-style: italic; 
    font-family: Georgia, Times, serif;
    }
    In the first rule in that code there is no closing } thus everything under it isn't being read.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  7. #7
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,510
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    Code:
    p { 
    font-size: small; 
    color: navy;
     
    #tagline p {
    font-style: italic; 
    font-family: Georgia, Times, serif;
    }
    In the first rule in that code there is no closing } thus everything under it isn't being read.
    Whatt? Yeah, there is?
    HTML Code:
    p { font-style:italic;}
    </DIV>
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  8. #8
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I was talking about the OPS code not yours Blake........
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  9. #9
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I trust this replies to 2bee, but I am still trying to figure out the forms.

    I am trying to change a sentence in the tagline but according to the instructions in the book (page 98). I assume I have made some simple mistake but can't find it after many tries.

    Thanks for your interest.

  10. #10
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    You didn't put the closing bracket there. (Add the bold
    Code:
    p { 
    font-size: small; 
    color: navy;
     }
    #tagline p {
    font-style: italic; 
    font-family: Georgia, Times, serif;
    }
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  11. #11
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ryan Reese,
    Thank you. Your spotting the non-close for the Paragraph (p) did the trick. Wow, what a great way to learn.

    You said after your signature age doesn't matter, I think mine does, I'm 75.

    And thanks to all who commented.

    Tom

  12. #12
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Middleman View Post
    Ryan Reese,
    Thank you. Your spotting the non-close for the Paragraph (p) did the trick. Wow, what a great way to learn.
    In the future you can validate your code (to avoid awkward situations as this)

    You said after your signature age doesn't matter, I think mine does, I'm 75.

    And thanks to all who commented.

    Tom
    I put that there because when Ifirst joined I got a lot of crap for being so young. Now that they know I'm not a "noob" at this stuff they have left me alone..for the most part.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  13. #13
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good for you Ryan,
    By the way does the material have to be posted online in order to validate it or can I do it just do it on my computer.

  14. #14
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Well some programs have built in validators..though the only true validators are this one for HTML, and this one for CSS.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  15. #15
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Middleman View Post
    Good for you Ryan,
    By the way does the material have to be posted online in order to validate it or can I do it just do it on my computer.
    If you use the Firefox browser, you can download an add-on that lets you validate your pages locally (from your own computer)..via clicking on one of the choices in the toolbar.

    Find the add-on here: http://chrispederick.com/work/web-developer/




  16. #16
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Nadia P,

    I will check that out.

  17. #17
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You message was blank.

  18. #18
    SitePoint Member Middleman's Avatar
    Join Date
    Jul 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have downloaded Wed Developer, a FireFox ad-on, but it tries to open in Netscape and I am told it cannot open in Netscape Canada because I am not compatible and when I tell it to open in my other choice available, IE, it still goes back to Netscape and refuses to open. I have Netscape 8 on my Windows XP equipped computer and it works fine for others things. I have tried downloading it with IE and FireFox that does not help.


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
  •