Thread: css

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    465

    css

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html>
    <head><title>My first styled page</title>
    </head>
    <style>body {
        padding-left: 11em;
        font-family: Georgia, "Times New Roman",
              Times, serif;
        color: purple;
        background-color: blue }
      ul.navbar {
        list-style-type: none;
        padding: 0;
        margin: 0;
        position: absolute;
        top: 2em;
        left: 1em;
        width: 9em }
      h1 {
        font-family: Helvetica, Geneva, Arial,
              SunSans-Regular, sans-serif }
      ul.navbar li {
        background: white;
        margin: 0.5em 0;
        padding: 0.3em;
        border-right: 1em solid black }
      ul.navbar a {
        text-decoration: none }
      a:link {
        color: blue }
      a:visited {
        color: purple }
      address {
        margin-top: 1em;
        padding-top: 1em;
        border-top: thin dotted }
    </style
    <body>
    
    <!-- Site navigation menu -->
    <ul class="navbar">
      <li><a href="index.html">Home page</a>
      <li><a href="musings.html">Musings</a>
      <li><a href="town.html">My town</a>
      <li><a href="links.html">Links</a>
    </ul>
    
    <!-- Main content -->
    <h1>My first styled page</h1>
    
    <p>Welcome to my styled page!
    
    <p>It lacks images, but at least it has style.
    And it has links, even if they don't go
    anywhere&hellip;
    
    <p>There should be more here, but I don't know
    what yet.
    </address>
    
    </body>
    </html>
    How do I go about putting the nav bar on top and making the boxed links closer together.
    My computer is awesome.

  2. #2

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    wow thanks!
    My computer is awesome.

  4. #4
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    Just because CSS starts with a C doesn't make it a C programming language :P

    Google it, by the way.

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    who said it makes it c programming?
    My computer is awesome.

  6. #6
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    The sarcasm is lost on cerin

  7. #7
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    lololololololololololol try Cascading style sheets
    The sarcasm is lost on cerin
    I guess so
    My computer is awesome.

  8. #8
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Ya know, looking at that makes my PHP code look good in some parts (which is bad!), I've noticed something "odd":

    PHP Code:
    body {
        
    padding-left11em;
        
    font-familyGeorgia"Times New Roman",
              
    Timesserif;
        
    colorpurple;
        
    background-colorblue 
    1. What does "11em" in padding-left mean? I've never heard of 11em's of padding. I've heard of 11 pixels (px) and 11 points (pt), but not em.

    2. Why is TNR in quotes, but the rest are not?

  9. #9
    Registered User
    Join Date
    Dec 2004
    Posts
    465
    no clue

    EDIT: if you say so
    Last edited by cerin; 01-08-2005 at 07:57 PM.
    My computer is awesome.

  10. #10
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Quote Originally Posted by cerin
    no clue
    Ya know...one-or-two answer replies are really not worth posting...not to mention a waste of space on the browser window.

  11. #11
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Allow me to momentarily hijack this thread. While we were on the topic of annoying embedded sounds (especially mid, which everyone is picking on ) in the other thread, it got me thinking - does that apply to my site as well? It does have a 'stop' button, and offers a choice between 4 mids otherwise, and the controls are easily accessible in the bottom left corner at all times. And the music is dampened to a much lower volume by default.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  12. #12
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Quote Originally Posted by Hunter2
    Allow me to momentarily hijack this thread. While we were on the topic of annoying embedded sounds (especially mid, which everyone is picking on ) in the other thread, it got me thinking - does that apply to my site as well? It does have a 'stop' button, and offers a choice between 4 mids otherwise, and the controls are easily accessible in the bottom left corner at all times. And the music is dampened to a much lower volume by default.
    If the music is stopped by default, than it should be good.

  13. #13
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    I think if there is music it should not be set to play unless the user presses the play button. There are of course exceptions...

    EDIT
    Beat me to it

  14. #14
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    It'd be all right with me, if you weren't using frames :P

  15. #15
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    Quote Originally Posted by Quantrizi
    1. What does "11em" in padding-left mean? I've never heard of 11em's of padding. I've heard of 11 pixels (px) and 11 points (pt), but not em.

    2. Why is TNR in quotes, but the rest are not?
    em is just another length unit, just like in and the other two you typed. It's just a matter of preference. You can check out the comparisons Here

    TNR is in quotes because it has spaces in it. It's customary in CSS to put quotes around fonts that have more than one word. Not only is it probably customary, but probably also more browser portable for browser interpretation.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Web designer needed! html, css and other design stuff...
    By Akkernight in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 04-11-2009, 09:33 AM
  2. Counter-Strike: Source animated spray maker
    By Asbestos in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 02-05-2009, 07:00 PM
  3. CSS extraction
    By anandganapati in forum C Programming
    Replies: 1
    Last Post: 04-29-2008, 11:26 PM
  4. css ?
    By cerin in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 02-07-2005, 05:22 PM
  5. CSS in CAPS
    By sean in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-16-2003, 12:33 PM