DIV Issue.. Please Help!
Posted: 08 November 2006 10:39 PM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2006-07-12

Hey,

I’m having issues w/ the right and bottom of this site…

http://www.suburbannoizerecords.com/frontpage.htm

Here’s the coding

<style type="text/css">
<!--
.
topleft {
    position
absolute;
    
height61px;
    
width52px;
    
left0px;
    
top0px;
    
background-color#000000;
    
background-imageurl(storefront/topleft.jpg);
}
.topcenter {
    position
absolute;
    
height61px;
    
width100%;
    
left52px;
    
top0px;
    
right51px;
    
background-color#000000;
    
background-imageurl(storefront/topcenter.jpg);
    
background-repeatrepeat-x;
}
.topright {
    position
absolute;
    
height61px;
    
width51px;
    
top0px;
    
right0px;
    
background-color#000000;
    
background-imageurl(storefront/topright.jpg);
}
.centerleft {
    position
absolute;
    
height100%;
    
width52px;
    
left0px;
    
top0px;
    
bottom0px;
    
background-color#000000;
    
background-imageurl(storefront/centerleft.jpg);
    
background-repeatrepeat-y;
}
.centerright {
    position
absolute;
    
height100%;
    
width51px;
    
top0px;
    
right0px;
    
bottom0px;
    
background-color#000000;
    
background-imageurl(storefront/centerright.jpg);
    
background-repeatrepeat-y;
}
.bottomleft {
    position
absolute;
    
height38px;
    
width52px;
    
left0px;
    
bottom0px;
    
background-color#000000;
    
background-imageurl(storefront/bottomleft.jpg);
    
top0px;
}
.bottomcenter {
    position
absolute;
    
height38px;
    
width100%;
    
left52px;
    
right51px;
    
bottom0px;
    
background-color#000000;
    
background-imageurl(storefront/bottomcenter.jpg);
    
background-repeatrepeat-x;
    
top0px;
}
.bottomright {
    background
-color#000000;
    
background-imageurl(storefront/bottomright.jpg);
    
positionabsolute;
    
height38px;
    
width51px;
    
right0px;
    
bottom0px;
    
top0px;
}
.storefront {
    position
absolute;
    
height100%;
    
width100%;
    
left125px;
    
top160px;
    
right0px;
    
bottom0px;
    
overflowvisible;
}
.center {
    font
-familyVerdanaArialHelveticasans-serif;
    
font-size12px;
    
color#000000;
    
background-color#FFFFFF;
    
positionabsolute;
    
height100%;
    
width100%;
    
left52px;
    
top0px;
    
right51px;
    
bottom0px;
}
body
,td,th {
    color
#FFFFFF;
}
body {
    background
-color#000000;
}
a
:link {
    color
#FF0000;
    
text-decorationnone;
}
a
:visited {
    text
-decorationnone;
    
color#990000;
}
a
:hover {
    text
-decorationunderline;
    
color#666666;
}
a
:active {
    text
-decorationnone;
    
color#990000;
}
.bottom {
    position
absolute;
    
height38px;
    
width100%;
    
left0px;
    
right0px;
    
bottom0px;
    
overflowvisible;
}
.hori-center {
    position
absolute;
    
height100%;
    
width100%;
    
left0px;
    
top61px;
    
right0px;
    
bottom38px;
}
.top {
    position
absolute;
    
height61px;
    
width100%;
    
left0px;
    
top0px;
    
right0px;
}
-->
</
style>
<
div class="storefront" id="storefront">
  <
div class="top" id="top">
      <
div class="topleft" id="topleft"></div>
      <
div class="topcenter" id="topcenter"></div>
      <
div class="topright" id="topright"></div>
  </
div>
  
  <
div class="hori-center" id="hori-center">
      <
div class="centerleft" id="centerleft"></div>
      <
div class="center" id="center">INSERT ALL TEXT HERE ```````!</div>
      <div class="centerright" id="centerright"></div>
  </div>
  <div class="bottom" id="bottom">
    <div class="bottomleft" id="bottomleft"></div>
    <div class="bottomcenter" id="bottomcenter"></div>
    <div class="bottomright" id="bottomright"></div>
  </div>
</div> 

Pretty much, it’s supposed to be a white box (w/ the cool edges) that expands height and width wise to fit the screen (the top and left margins are set for a header and left side global navigation)

This is SOO important that I fix this today and I’d love and adore anyone that could help me MORE than you will ever know.

Please let me know if you can help.

And if you need more info contact me on AIM my screen name is taxgirlsrh or PM me or something.  Please and thank you!!

Profile
 
 
Posted: 09 November 2006 03:54 AM   [ Ignore ]   [ # 1 ]
Newbie
Avatar
Rank
Total Posts:  2
Joined  2006-11-09

Ok, you got a number of bugs:

(1) Delete all your:

height100%;
width100%; 

That is causing your problem because you don’t need to specify the 100% in the height and width.  When you specified “position: absolute” it refers to full screen automatically.

(When you set the height and width to 100%, it corresponds to the 100% of the next outermost <DIV> container, so it expands beyond 100% of the screen, screwing everything up.)

(2) You only need to specify the class in your <DIV> because you only defined the “class” (as .hori-center , for example), but not the “ID” (as #hori-center).  So remove all your ID tags in your <DIV> tags.

(ID is really a sub-class, so technically, you cannot have a class and subclass with the same name, causing a collision.  It doesn’t cause real problem for most browsers because they just ignore the conflict, but you can’t just assume the browser will resolve the conflict though.  Some browsers are dumb.)

(3) You forgot </HEAD> and <BODY> tags that should appear between your </STYLE> and the first <DIV> in your HTML page.

(It doesn’t cause real problem now when your code is simple, but later, it could cause you problem if the browser is not smart enough to figure out that there were missing </HEAD> and <BODY> tags.)

Profile