SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    lisboa
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css declaration and javascript

    i wonder how can i have both javascript writen inside body and css declaration
    here's my page: i only see the output if i comment the css line:
    HTML Code:
    <html>
    <head>
     <title>lição nº 2</title>
     
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     
     <!--<link href="css/estilo.css" rel="stylesheet" type="text/css" />-->
     
     <script  type = "text/javascript">
     
      var segundosNumMinuto = 60;
     
      var minutosNumaHora = 60;
     
      var horasNumDia = 24;
     
      var diasNumAno = 365;
     
     
     
      var segundosNumDia = segundosNumMinuto * minutosNumaHora * horasNumDia;
     
      var segundosNumAno = segundosNumDia * diasNumAno;
     
     </script>
     
    </head>
     
    <body>
     <script language = "JavaScript">
     
      document.writeln("Um ano tem " + segundosNumAno + " segundos.");
     
     </script>
    </body>
    </html>
    how can i have both?

    TiA

  2. #2
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    lisboa
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i got home, transfered the files from my laptop(winXPHome) to my pc (winXPPro) and all works fine
    i tried something along:
    HTML Code:
    <style type="text/css">
    <!--
    @import url(mycss.css)
    -->
    </style>
    then i deleted this, and still worked fine; finally i sent this file back to my laptop and to my amazement... it works fine there too
    i'm quite puzzled


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
  •