Website Positioning Help!

Grab your favourite IDE and tinker with the innards of game engines

Postby NightWolf on Tue May 29, 2007 7:41 pm

Now I am doing the design a little differently and need some help.

First I have my div right_container floated right which is in the content_container the problem is since its floated right for some reason the content_container doesn't expand.

Next in the links area where is says "Links will go here." its 1px off on the right. http://inevmaps.hl2files.com/v9/index.php

I tried to fix it but have had no luck.

Here is my new CSS:

Code: Select all
@charset "utf-8";
/* CSS Document */

body{
margin:0;
text-align:center;
background-color:#536e7c;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
}

#main_container{
width:900px;
height:auto;
background-image:url(images/bg.gif);
background-repeat:repeat-y;
margin-left: auto;
margin-right: auto;
text-align:center;
}

#banner{
background-image:url(images/banner.jpg);
width:850px;
height:150px;
margin:auto;
}

#navbar{
height:32px;
width:850px;
margin:auto;
}

#footer{
background-image:url(images/footer_bar.gif);
width:900px;
height:50px;
}

#content_container{
width:850px;
height:auto;
margin:auto;
text-align:left;
}

#right_container{
width:150px;
height:auto;
float:right;
}

#links{
height:auto;
width:150px;
background:#CCCCCC;
border:solid #c2c2c2;
border-width:0px 1px 0px 1px;
}

#links_topcap{
background-image:url(images/links_top_cap.gif);
width:150px;
height:25px;
}

#sidebar_bottomcaps{
background-image:url(images/small_bottom_cap.gif);
height:25px;
width:150px;
}


Here is my new html:

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="inevmaps.css" rel="stylesheet" type="text/css" />
&lt;script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
   d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('images/home_over.gif','images/maps_over.gif','images/media_over.gif','images/forums_over.gif','images/about_over.gif','images/contact_over.gif')">

<div id="main_container">

  <div id="banner"></div>
   
      <div id="navbar">
      
        <a href="http://inevmaps.hl2files.com/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','images/home_over.gif',1)"><img src="images/home.gif" name="Home" width="140" height="32" border="0" id="Home" /></a><a href="http://inevmaps.hl2files.com/maps.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Maps','','images/maps_over.gif',1)"><img src="images/maps.gif" name="Maps" width="142" height="32" border="0" id="Maps" /></a><a href="http://inevmaps.hl2files.com/media/index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Media','','images/media_over.gif',1)"><img src="images/media.gif" name="Media" width="143" height="32" border="0" id="Media" /></a><a href="http://inevmaps.hl2files.com/forums/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Forums','','images/forums_over.gif',1)"><img src="images/forums.gif" name="Forums" width="143" height="32" border="0" id="Forums" /></a><a href="http://inevmaps.hl2files.com/about.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('About','','images/about_over.gif',1)"><img src="images/about.gif" name="About" width="142" height="32" border="0" id="About" /></a><a href="http://inevmaps.hl2files.com/contact.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','images/contact_over.gif',1)"><img src="images/contact.gif" name="Contact" width="140" height="32" border="0" id="Contact" /></a></div>
   
              <div id="content_container">
              <div id="right_container">
              <div id="links_topcap"></div>
              <div id="links">Links will go here.</div>
              <div id="sidebar_bottomcaps"></div>
              </div>
              </div>
   
         <div id="footer"></div>
</div>

</body>
</html>
Last edited by NightWolf on Wed May 30, 2007 1:55 am, edited 1 time in total.
Image
User avatar
NightWolf
May Contain Skills
May Contain Skills
 
Joined: Tue Jul 12, 2005 11:55 pm
Location: The 4th Dimension...

Postby Dead-Inside on Wed May 30, 2007 1:43 am

Umm, you have to log in to view something and I'm guessing it's the image/s?
Image
User avatar
Dead-Inside
Veteran
Veteran
 
Joined: Wed Jan 05, 2005 4:15 pm
Location: Sweden (It's just as cold as you think it is)

Postby NightWolf on Wed May 30, 2007 1:53 am

Yeah I know lol, I posted a help topic at another forum and now it works :-D

I passworded it because you have all seen to much lol
I actually plan on putting up the new site at the same time I put up my map.

I also removed the image so it wont ask for a password on this site :P
Image
User avatar
NightWolf
May Contain Skills
May Contain Skills
 
Joined: Tue Jul 12, 2005 11:55 pm
Location: The 4th Dimension...
Previous

Return to Programming

Who is online

Users browsing this forum: No registered users