Can I center frames in center of page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tcontradiction
    New Member
    • Jan 2008
    • 1

    Can I center frames in center of page

    it can be seen on my page at http://total-contradiction.c om/index3.html
    i have the frames i want them but i the page in the center of the screen.


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Total Contradiction Studios </title>
    <frameset rows="611, 27" frameborder="0" border="0" framespacing="0 ">
    <frameset rows="*" cols="197,*" frameborder="no " border="0" framespacing="0 ">
    <frame src="leftbanner .html" name="leftFrame " scrolling="no" noresize="nores ize" id="leftFrame" title="leftFram e" />
    <frameset rows="120,*" frameborder="no " border="0" framespacing="0 ">
    <frame src="topbanner. html" name="topFrame" scrolling="No" noresize="nores ize" id="topFrame" title="topFrame " />
    <frame src="welcome.ht ml" name="mainFrame " id="mainFrame" title="mainFram e" scrolling="no"/>
    </frameset>
    </frameset>
    <frame src="indexmusic .html" name="Musicpage " id="Musicpage" title="Musicpag e" scrolling="no" />
    </frameset>
    <noframes></noframes></head><body>
    </body>
    </html>
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    Hi,
    Sorry to inform you but frames aren't designed to be used like this. The best thing to do is use the CSS solution.

    take a look at this...
    Very simplified template for a center down approac to a website

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>HELLO WORLD</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <style type="text/css">
      body { margin-left: 0px;
          margin-top: 0px; margin-right: 0px; margin-bottom: 0px;}
      #navMain {width:768px;height:25px;color:#ff0000;}
      #navMain ul{background-color:#ff0000;padding-left:0px;margin-left:0px;width:100%;}
      #navMain ul li{border:0px solid #000000;margin:0px 0px;float:left;list-style:none;}
      #navMain ul li a{ color:#ccccff; display:block;padding:5px 10px; margin: auto 3px;}
      #navMain ul li a:hover{ color:#ccccff;}
      #mainpage{ position:relative; width:768px; margin:5px auto; padding:10px; }
      #midbar{ width:768px; height:600px; border:2px solid #ccccff; top:125px; left:0px; z-index:5; }
      #bodyMain{ padding:15px; width:738px; border:1px solid #cccccc; top:0px; left:0px; }
      #headBar{ width:768px; height:100px; top:0px; left:0px; background-color:#996600;}
    </style>
    
    </head>
    <body>
    
    <div id="mainpage">
      <div id="headBar">
        <h1>MY SITE LOGO</h1>
      </div>
      <div id="navMain">
        <ul>
          <li><a href="#">Link one</a></li>
          <li><a href="#">Link one</a></li>
          <li><a href="#">Link one</a></li>
          <li><a href="#">Link one</a></li>
          <li><a href="#">Link one</a></li>
          <li><a href="#">Link one</a></li>
        </ul>
      </div>
      <div id="midBar">
        <div id="bodyMain">
          <h2>Welcome?</h2>
          Hello world, content goes here  content goes here content goes here content goes here content goes
          here content goes here content goes here content goes here content goes here content goes here
        </div>
      </div>
    </div>
    
    </body>
    </html>

    Comment

    • Death Slaught
      Top Contributor
      • Aug 2007
      • 1137

      #3
      tcontridiction, please use proper code tags when posting your code.


      Please refer to the link in my signature for the posting guidelines.

      Thanks, Death

      Comment

      Working...