Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: css template not working

  1. #1
    Join Date
    Jul 2008
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default css template not working

    i have this template i got off of this site but it does not work. When i view the web page the coloumns are shifted to the left so all you see is half of the right column and to left side of the screen.

    Code:
    <style type="text/css">
    
    body{
     margin: 0;
     padding: 0;
     line-height: 1.5em;
    }
    
    b{font-size: 110%;}
    em{color:red;}
    
    #maincontainer{
     width: 940px; /*width of main container*/
     margin: 0 auto; /*Center container on page*/
    }
    
    #topsection{
     background: #EAEAEA;
     height: 90px /*Height of top section*/
    }
    
    #topsection h1{
     margin: 0;
     padding-top: 12px;
    }
    
    #contentwrapper{
     float: right;
     width: 100%;
    }
    
    #contentcolumn{
     margin: 0 190px 0 188px; /*margins for content column. should be "0 right columnwidth 0 leftcolumn width*/
    }
    
    #leftcolumn{
     float: left;
     width: 188px; /*width of left column in pixel*/
     margin-left: -940px; /*set margin to that of -(maincontainerwidth)*/
     background: #C8FC98;
    }
    
    #rightcolumn{
     float: left;
     width: 190px; /*width of right column in pixel*/
     margin-left: -190px; /*set margin to -(rightcolumnwidth)*/
     background: #336699;
    }
    
    #footer{
     clear: left;
     width: 100%;
     background: black;
     color: #FFF;
     text-align: center;
     padding: 4px 0;
    }
    
    #footer a{
     color: #FFFF80;
    }
    
    .innertube{
     margin: 20px; /*margins for inner div inside each column (to provide padding)*/
     margin-top: 0;
    }
    
    A.menulink{
     display: block;
     width: 170px;
     text-align: left;
     text-decoration: none;
     font-family: arial;
     font-size: 11px;
     color: #000000;
     border: none;
     border: solid 1px #ffffff;
    }
    
    A.menulink:hover {
     border: solid 1px #6100c1;
     background-color: #f0e1ff;
    } 
    
    </style>
    can anyone help with this issue.

  2. #2
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    Please include your HTML as well.

  3. #3
    Join Date
    Jul 2008
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    sorry bout that
    Code:
    <html>
    <head>
      <link href = "style.css" rel = "stylesheet" type = "text/css">
    </head>
    <title></title>
    <body>
      <div id="maincontainer">
          <div id="topsection"><div class="innertube">
                <h1>PowerNet Global 
                </h1>
    
          </div> 
      </div>
    
      <div id="contentwrapper">
          <div id="contentcolumn">
             <div class="innertube">
                  <center>main informaition.</center>
                    kasdjfl;kjaslkd;jflkasjdf;lkjaklsdj;lkj;lsjdfkj
             </div>
          </div>
    
    
                                               <div id="leftcolumn">
                                                              <div class="innertube"><b>left column: <em>180px</em></b>
                                                                               <table border="0" width="180">
                                                                                            <tr>
                                                                                              <td width="100%" bgcolor="#E6E6E6"><b>links to site<b>
                                                                                            </tr>
                                                                                             </td>
                       <tr>
                         <td width="100%"><a href="services.html" class="menulink" class=&{ns4class};>Services</a>
                         </td>
                      </tr>
                   </table>
                       ;kasjd;kfjalsjdf;lkjasdkljfla;ksjdflkjaslkjdglkhasfl;ghla;ksgl;asgljasjfgfkljasdf
             </div>
        </div>
       
                              <div id="rightcolumn">
                                         <div class="inndertube">
                                                           fill with local/world news with weather or other info 
     
                                                                   <script src="http://gmodules.com/ig/ifr?url=http://blog.outer-court.com/homepage/miniweb.xml&amp;synd=open&amp;w=180&amp;h=140&amp;title=Mini+Web&amp;border=%23ffffff%7C0px%2C1px+solid+%23004488%7C0px%2C1px+solid+%23005599%7C0px%2C1px+solid+%230077BB%7C0px%2C1px+solid+%230088CC&amp;output=js">
                                                                   </script>
                                         </div>
                               </div>
    
                         <div id= "footer">
                                     <a href="http://www.pngusa.net">Go back Home</a>
                         </div>
    </div>
    
    
    
    </body>
    </html>

  4. #4
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    No offense, but you have really butchered that code up. Would you please link me to the original template you used and I'll try and work you through it.

  5. #5
    Join Date
    Jul 2008
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    http://www.dynamicdrive.com/style/la...d-fixed-fixed/ how did i butcher that did think i could.

  6. #6
    Join Date
    Jul 2008
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    is anyone able to help.

  7. #7
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    First, you missed to add a DTD in your page.

    Secondly, I wonder why you have to float the element to the right, when your expected behavior is to the left:
    Code:
    #contentwrapper{
     float: right;
     width: 100%;
    }
    Change the highlighted to left.

    Third, you were not closing your contentwrapper div:
    Code:
     <div id="contentwrapper">
          <div id="contentcolumn">
             <div class="innertube">
                  <center>main informaition.</center>
                    kasdjfl;kjaslkd;jflkasjdf;lkjaklsdj;lkj;lsjdfkj
             </div>
          </div>
    </div>
    Add the highlighted.

    Lastly, you have this typo:
    Code:
    div id="rightcolumn">
                                         <div class="inndertube">
    And as a parting thought, you've got a number of deprecated tags (<center>) and attributes:


    Hope it helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  8. The Following User Says Thank You to rangana For This Useful Post:

    pngsigut (07-03-2008)

  9. #8
    Join Date
    Jul 2008
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    i thought the contentwrapper should enclose the entire page and other div tags... and i was using the tags just for testing. but thanks for the help so far.

  10. #9
    Join Date
    Jul 2008
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Default

    can anyone help on why this does not show up in IE

  11. #10
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Which does'nt show you mean?

    Show us a your complete modification or better a link instead.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

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
  •