DotDragnet
February 08, 2012, 07:40:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the new trading eye refugees
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: CSS Issues  (Read 482 times)
Dud
Jr. Member
**
Posts: 93



View Profile Awards
« on: August 14, 2010, 05:23:36 PM »

Hi

Im having a few issues with html and css layouts. Basically the div #Wrapper will not fill 100% height. If you have more text than height it goes over the blue background image. Easy way to replicate is reduce the height of your browser so you can see about an inch of the page, scroll down and see all the text flooding off the end of the page.

Site here:
http://www.sebdud.co.uk/seb/userCake/index.php

code here:

Code:
<body>
<div id="wrapper">
   <div id="content">
   
        <div id="left-nav">
include my nav here
        <div class="clear"></div>
        </div>
        <div id="main">
        body text here
       </div>
       </div>

   </div>
</div>
</body>
css:

html, body {
margin: 0px;
background: #061D35;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:0.95em;
color:#fff;
height:100%;
}
#wrapper {
margin:50px auto 0 auto;
background:url('layout/wrapper-bg.png');
background-repeat:repeat-y;
width:765px;
height:100%;
}

#wrapper #content {
padding:45px 30px 0 30px;
height:100%;
}


Thanks in advance!!
Logged
Mr Anderson
DDN Contribs
Hero Member
*****
Posts: 2213



ap4a.uk ap4a
View Profile WWW Awards
« Reply #1 on: August 23, 2010, 02:56:10 PM »

That example page redirects to the front end of the site, so I can't see your problem in action to say for certain. But by setting a fixed height of 100% you're limiting how high (obv.) those containers can be - in the case of your example to the height of the viewport (hence why reducing the height of the viewport reduces the size of those containers). And your text overflows as that's what it's supposed to do unless you tell it not to. What you need to do is set a min-height.
Logged

Dud
Jr. Member
**
Posts: 93



View Profile Awards
« Reply #2 on: August 25, 2010, 05:08:48 PM »

Thanks, i did a bit more reading and realised specifying a height will limit it!! removed the height from the wrapper and divs and its sorted. Thanks for the advice though.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!