Results 1 to 6 of 6

Thread: Trying to Design Website using CSS Layout

  1. #1
    Join Date
    Apr 2008
    Posts
    19
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default Trying to Design Website using CSS Layout

    Hi,



    Am trying to design my website using CSS Layout with DW MX 2004. The website design looks ok in the DW Design View. However, when I preview in browser (firefox & ie), there's no background color, the text are all the same size, etc. I am very bad in explaining... hope you guys understand what I am trying to say.



    Here's my html code:

    PHP Code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

    "http://www.w3.org/TR/html4/loose.dtd"
    >

    <
    html>

    <
    head>

    <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <
    title>Untitled Document</title>

    <
    script language="JavaScript" type="text/JavaScript">

    <!--

    function 
    MM_reloadPage(init) {  //reloads the window if Nav4 resized

      
    if (init==truewith (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

        
    document.MM_pgW=innerWidthdocument.MM_pgH=innerHeightonresize=MM_reloadPage; }}

      else if (
    innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgHlocation.reload();

    }

    MM_reloadPage(true);

    //-->

    </script>

    <link href="/styles.css" rel="stylesheet" type="text/css">

    </head>

    <body>

    <div id="outer">

    <div id="header">Header</div>

    <div id="nav"> Navigation</div>

    <div id="banner">Banner</div>

    <div id="content">Content</div>

    <div id="footer">Footer</div>

    </div>

    </body>

    </html> 


    And here's my css:

    PHP Code:

    body 
    {

     
    text-aligncenter;

     
    background-color#000000;

    }

    div#outer {

        
    width80%;

        
    background-color:#FFFFFF;

        
    margin-top0px;

        
    margin-bottom0px;

        
    margin-leftauto;

        
    margin-rightauto;

        
    padding0px;

        
    borderthin solid #000000;

    }#header {

     
    font-familyVerdanaArialHelveticasans-serif;

     
    font-size24px;

     
    font-weightbolder;

     
    text-transformcapitalize;

     
    color#666666;

     
    background-color#FFFF00;

     
    width800px;

    }

    #nav {

     
    font-familyVerdanaArialHelveticasans-serif;

     
    background-color#FFFF00;

     
    height200px;

     
    width200px;

     
    floatleft;

     
    margin0px;

     
    padding0px;

    }

    #banner {

     
    background-color#33FF00;

     
    height200px;

     
    width600px;

     
    floatright;

    }

    #content {

     
    font-family"Times New Roman"Timesserif;

     
    font-size12px;

     
    color#333333;

     
    background-color#00FFFF;

     
    heightauto;

     
    width800px;

    }

    #footer {

     
    font-familyVerdanaArialHelveticasans-serif;

     
    font-size9px;

     
    color#000000;

     
    background-color#CCFFFF;

     
    width800px;




    Can anyone help me?



    Thanks so much.

    JP

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    The following works with me. I just copied your lines and put everything in one page:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <title>Untitled Document</title>
    
    <style type="text/css">
    body {
    
     text-align: center;
    
     background-color: #000000;
    
    }
    
    div#outer {width: 80%; background-color:#FFFFFF;
    
        margin-top: 0px;
    
        margin-bottom: 0px;
    
        margin-left: auto;
    
        margin-right: auto;
    
        padding: 0px;
    
        border: thin solid #000000;
    
    }
    
    #header {
    
     font-family: Verdana, Arial, Helvetica, sans-serif;
    
     font-size: 24px;
    
     font-weight: bolder;
    
     text-transform: capitalize;
    
     color: #666666;
    
     background-color: #FFFF00;
    
     width: 800px;
    
    }
    
    #nav {
    
     font-family: Verdana, Arial, Helvetica, sans-serif;
    
     background-color: #FFFF00;
    
     height: 200px;
    
     width: 200px;
    
     float: left;
    
     margin: 0px;
    
     padding: 0px;
    
    }
    
    #banner {
    
     background-color: #33FF00;
    
     height: 200px;
    
     width: 600px;
    
     float: right;
    
    }
    
    #content {
    
     font-family: "Times New Roman", Times, serif;
    
     font-size: 12px;
    
     color: #333333;
    
     background-color: #00FFFF;
    
     height: auto;
    
     width: 800px;
    
    }
    
    #footer {
    
     font-family: Verdana, Arial, Helvetica, sans-serif;
    
     font-size: 9px;
    
     color: #000000;
    
     background-color: #CCFFFF;
    
     width: 800px;
    
    }  
    </style>
    
    <script language="JavaScript" type="text/JavaScript">
    
    <!--
    
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
    
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    
    }
    
    MM_reloadPage(true);
    
    //-->
    
    </script>
    
    <link href="/styles.css" rel="stylesheet" type="text/css">
    
    </head>
    
    <body>
    
    <div id="outer">
    
    <div id="header">Header</div>
    
    <div id="nav"> Navigation</div>
    
    <div id="banner">Banner</div>
    
    <div id="content">Content</div>
    
    <div id="footer">Footer</div>
    </div>
    
    
    </body>
    
    </html>
    Arie Molendijk.
    Last edited by molendijk; 07-17-2008 at 03:31 PM. Reason: Correction

  3. The Following User Says Thank You to molendijk For This Useful Post:

    jadepearl (07-18-2008)

  4. #3
    Join Date
    Apr 2008
    Posts
    19
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default

    Thanks Arie for your reply.

    I was just wondering if somehow DW MX 2004 programme could read the stylesheet link or is there other problems which I as a newbie could not detect?

    I am following some online tutorials also and somehow, when I try preview in browser (firefox & ie), I get the same results...nothing as what I see in the WUSIWYG. *sigh*

    Please help.

    Thanks so much!

  5. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It looks as though the path that DreamWeaver sets is wrong.

    However, the best advice that can be given here is to stop using a WYSIWYG editor and learn to code your pages yourself -- there's an excellent set of tutorials at http://www.howtocreate.co.uk/. DreamWeaver and other programs like it are incapable of producing quality code unless you turn off all its WYSIWYG features and simply write the page yourself anyway, using it as little more than a text editor.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. The Following User Says Thank You to Twey For This Useful Post:

    jadepearl (08-10-2008)

  7. #5
    Join Date
    Apr 2008
    Posts
    19
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default

    Thanks Twey!

  8. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You're welcome.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. The Following User Says Thank You to Twey For This Useful Post:

    jadepearl (09-29-2008)

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
  •