6 Replies - 1486 Views - Last Post: 24 February 2010 - 09:54 AM

#1 inspectah  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 27-April 09

Page content overlapping

Posted 22 February 2010 - 02:38 PM

Hi Below is my CSS code and i would like to aski if anyone cam help me with the page content. Basically I want the page content to fit on the page regardless of the width or height. My current code overlaps if the content width is higher I tried rectifying it but no success. any help will be really appreeacited.

 * { margin: 0; padding: 0; outline: 0; }

body {
	background: #caced1;
	color: #330066;
	text-align: center;
	margin: 15px 0;
	font-family: Verdana, Tahoma, arial, sans-serif;
	font-size: 70%;
	line-height: 1.5em;
}

/* links */
a, a:visited {
	text-decoration: none;
	background: inherit;
	color: #303;
}
a:hover {
	text-decoration: underline;
	background: inherit;
	color: #000;
}

/* headers */
h1, h2, h3 { font-family: 'Trebuchet MS', Tahoma, Sans-serif;  }
h1 {
	font-size: 180%;	
	font-weight: normal;	
	color: #555;
}
h2 {
	font-size: 160%;
	color: #88ac0b;
	font-weight: normal;
}
h3 {
	font-size: 135%;	 
	color: #666666;
}

/* images */
img {
	background: #fff;
    border: 1px solid #E5E5E5;
	padding: 7px;
}
img.float-right { margin: 5px 0px 10px 10px;  }
img.float-left { margin: 5px 10px 10px 0px; }

h1, h2, h3, p {
	padding: 0;
	margin-top: auto;
	margin-right: auto;
	margin-bottom: auto;
	margin-left: auto;
}
ul, ol {
	margin: 5px 15px;
	padding: 0 25px;
}

code {
  margin: 5px 0;
  padding: 15px;
  text-align: left;
  display: block;
  overflow: auto;  
  font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace ;
  /* white-space: pre; */
  border: 1px solid #E5F0FB;  
  background: #F4F8FD;
}
acronym {
  cursor: help;
  border-bottom: 1px dotted #777;
}
blockquote {
  margin: 10px 15px;
  padding: 0 0 0 25px;  
  font: bold 1.3em/1.5em "Trebuchet MS", Tahoma, arial, Sans-serif; 
  color: #2361BA;
  border: 1px solid #E5F0FB;   
  background: #F4F8FD url(quote.jpg) no-repeat 8px 6px;
}

/* start - table */
table {
	border-collapse: collapse;
	margin: 10px 15px;	
}
th strong {
	color: #fff;
}
th {
	background: #306bc1 url(button-bg.jpg) repeat-x 0 0; 
	height: 35px;
	padding-left: 12px;
	padding-right: 12px;
	color: #fff;
	text-align: left;
	border: 1px solid #306bc1;
	border-bottom-width: 2px;
}
tr {
	height: 32px;
	background: #fff;	
}
td {
	padding-left: 12px;
	padding-right: 12px;
	border: 1px solid #E5F0FB; 
}
/* end - table */

/* form elements */
form {
	margin:10px 15px; 
	padding: 10px 0;
	border: 1px solid #E5F0FB; 
	background: #F4F8FD;
}
fieldset {
	margin: 0;	padding: 0;
	border: none;
}
legend {
	display: none;
}
label {
	display:block;
	font-weight:bold;
	margin: 7px 0;
}
input {
	padding:3px;
	border: 2px solid #E5F0FB;
	color:#000;
	font-family: Verdana, sans-serif;
	font-size: 1em;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
}
textarea {
	width:400px;
	padding:3px;
	font: normal 1em Verdana, sans-serif;
	border: 1px solid #E5F0FB; 
	height:100px;
	display:block;
	color:#777;
}
input.button { 
	font: bold 12px Arial, Sans-serif; 
	height: 28px;
	margin: 0;
	padding: 2px 3px; 
	color: #fff;
	background: #306bc1 url(button-bg.jpg) repeat-x 0 0; 
	border: 1px solid #306bc1;
}

/* search form */
.searchform {
	background-color: transparent;
	border: none;	
	margin: 0; 
	padding: 5px 0 5px 0;	
	width: 180px;	
}
.searchform p { margin: 0; padding: 0; }
.searchform input.textbox { 
	width: 110px;
	color: #777; 
	height: 20px;
	padding: 2px;	
	border: 1px solid #D2E8F7; 
	vertical-align: top;
}
.searchform input.button { 
	width: 55px;
	height: 26px;
	padding: 2px 5px;
	vertical-align: top;
}

/********************************************
   LAYOUT
********************************************/ 
#wrap {
	width: 790px;
	background: #CCC url(content.jpg) repeat-y center top;
	margin: 0 auto;
	text-align: left;
}
#content-wrap {
	clear: both;
	width: 760px;	
	margin: 5px auto;
	padding: 0; 	
}
#header {
	position: relative;
	height: 131px;
	background: #caced1 url(header.jpg) no-repeat center top;
	padding: 0;	
	color: #fff;	
}
#header h1#logo-text a {
	position: absolute;
	margin: 0; padding: 0;
	font: bolder 55px 'Trebuchet MS', Arial, Sans-serif;
	letter-spacing: -3px;
	color: #fff;
	text-transform: none;
	text-decoration: none;
	background: transparent;
	
	/* change the values of top and left to adjust the position of the logo*/
	top: 18px; left: 35px;	
}
#header p#slogan {
	position: absolute;
	margin: 0; padding: 0;
	font: bold 13px 'Trebuchet MS', Arial, Sans-serif;
	text-transform: none;
	color: #FFF;
	
	/* change the values of top and left to adjust the position of the slogan*/
	top: 80px; left: 50px;		
}

/* header links */
#header #header-links {
	position: absolute;
	color: #C6DDEE;
	font: bold 14px"Trebuchet MS", Arial, Tahoma, Sans-serif;
	top: 20px; right: 20px;	
}
#header #header-links a {	
	color: #fff;
	text-decoration: none;	
}
#header #header-links a:hover {
	color: #D4FF55;	
}

/* navigation */
#menu {
	clear: both;
	margin: 0 auto;
	padding: 0;
	font: bold 16px/40px "trebuchet MS", Arial, Tahoma, Sans-serif;
	height: 40px;
	width: 790px;
	background-color: #F0F;
	background-image: url(menu.jpg);
	background-repeat: no-repeat;
}
#menu ul {
	float: left;
	list-style: none;
	margin:0; padding: 0 0 0 20px;
}
#menu ul li {
	display: inline;
}
#menu ul li a {
	display: block;
	float: left;
	padding: 0 12px;
	color: #330066;
	text-decoration: none;
	background: url(sep.jpg) no-repeat 100% 100%;
}
#menu ul li a:hover {
	color: #cc0066;
}
#menu ul li#current a {
	color: #cc0066;
}

/* Main Column */
#main {
	float: left;
	width: auto;
	margin: 0;
	display: inline;
	background: url(box.jpg) no-repeat;
	padding-top: 20px;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 0;
}
#main h2 {
	padding: 0;
	margin-bottom: 0;
	color: #cc0066;
	font-family: 'Trebuchet MS', Tahoma, Arial, Sans-serif;
	font-size: 180%;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
}
#main h2 a {
	color: #330066;
	text-decoration: none;
}

#main p, #main h1, #main h2, #main h3, #main ol, #main ul,
#main blockquote, #main table, #main form {
	margin-left: 20px;
	margin-right: 25px;
	text-align: left;
}
#main ul li {
	list-style-image: url(bullet.gif); 
}

/* Sidebar */	

/* Footer */	
#footer {
	color: #C6DDEE;
	background: #caced1 url(footer.jpg) no-repeat center top;
	clear: both;
	width: 790px;
	height: 57px;
	text-align: center;	
	font-size: 90%;	
}
#footer p { 
	padding: 10px 0;
	margin: 0;
}
#footer a { 
	color: #fff;
	text-decoration: none; 
}

/* post footer */
.post-footer {
	background: #F4F8FD;
	padding: 5px; margin: 20px 25px 0 25px;
	border: 1px solid #E5F0FB; 
	font-size: 95%;	
}
.post-footer .date {	padding-left: 0px; margin: 0 5px; }
.post-footer .comments { padding-left: 0px; margin: 0 5px; }
.post-footer .readmore { padding-left: 0px; margin: 0 5px; }

.post-by { font-size: .95em;	margin-top: 0;	}

/* alignment classes */
.float-left  { float: left; }
.float-right { float: right; }
.align-left  { text-align: left; }
.align-right { text-align: right; }

/* clearing */
.fix {
	clear: both;
	height: 1px;
	margin: -1px 0 0;
	overflow: hidden;
}
.clear { display:inline-block; }
.clear:after {
	display:block;
	visibility:hidden;
	clear:both;
	height:0;
	content: " ";
}
#wrap #content-wrap #main {
	text-align: center;
}
#wrap #content-wrap #main table tr td table tr td p strong {
	text-align: left;
}
#wrap #content-wrap #main table tr td table tr td p strong {
	text-align: left;
}
 


Is This A Good Question/Topic? 0
  • +

Replies To: Page content overlapping

#2 Excavator  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 59
  • Joined: 10-December 06

Re: Page content overlapping

Posted 22 February 2010 - 05:39 PM

Hello inspectah,
I don't see any markup or content, only CSS. We'll need to see both or else we're just guessing... a link to the test site is always best.
Was This Post Helpful? 0
  • +
  • -

#3 inspectah  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 27-April 09

Re: Page content overlapping

Posted 23 February 2010 - 04:07 AM

here is the mark up


<!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>

<meta name="Description" content="" />
<meta name="Keywords" content="Team 23" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="" />
<meta name="Robots" content="index,follow" />

<link rel="stylesheet" href="images/team23.css" type="text/css" />

<title>Team 03</title>
<link rel="stylesheet" type="text/css" href="anylinkmenu.css" />

<script type="text/javascript" src="menucontents.js"></script>

<script type="text/javascript" src="anylinkmenu.js">



</script>

<script type="text/javascript">

anylinkmenu.init("menuanchorclass")

</script>	
</head>

<body>
<!--1st anchor link-->

<!-- wrap starts here -->
<div id="wrap">
		
	<!--header -->
	<div id="header">			
				
		<h1 id="logo-text">&nbsp;</h1>
		<div id="header-links">
			<p>
			<a href="#">Home</a> | 
			<a href="#">Contact</a> | 
			<a href="#">PMW</a> |
            <a href="#">LogOut</a>	|		
			</p>		
		</div><center align="right">
	</center></div>
		
	<!-- navigation -->	
	<div  id="menu">
		<ul>
			<li><a href="#">Home</a></li>
		   <li><a href="#">Header 1</a></li>
            <li><a href="#" class="menuanchorclass" rel="anylinkmenu1">Header 2</a></li>
			<li><a href="#">Header 3</a></li>
			<li><a href="#">header 4</a></li>
			<li><a href="#">Help</a></li>		
		</ul>
	</div>					
			
	<!-- content-wrap starts here -->
	<div id="content-wrap">
		
		<div id="main">				
				
			<h2>How to use .................</h2>
		  <h3>&nbsp;</h3>
		  <h3>Show All Bookings Page</h3>
			<table width="200" border="1">
			  <tr>
			    <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
		        <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
                <td>Header 1</td>
			    <td>Header 1</td>
			    <td>Header 1</td>
              </tr>
			  <tr>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
                <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
                <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
		      </tr>
			  <tr>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
                <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
                <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
		      </tr>
			  <tr>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
                <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
                <td>&nbsp;</td>
			    <td>&nbsp;</td>
			    <td>&nbsp;</td>
		      </tr>
		  </table>
			<p>&nbsp;</p>
<p>&nbsp;</p>
		</div>
	</div>
					
	<!--footer starts here-->
	<div id="footer">
			
		<p>
		&copy; 2009 <strong>Website</strong> |
		<a href="#" title="Team 03">Design By Team 03</a>|
		Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> | 
		<a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>   		
   	</p>
				
	</div>	

<!-- wrap ends here -->
</div>

</body>
</html>




Was This Post Helpful? 0
  • +
  • -

#4 inspectah  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 27-April 09

Re: Page content overlapping

Posted 23 February 2010 - 05:21 PM

:mellow: :mellow: :mellow: :mellow: :mellow: Need help

This post has been edited by inspectah: 23 February 2010 - 05:22 PM

Was This Post Helpful? 0
  • +
  • -

#5 Excavator  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 59
  • Joined: 10-December 06

Re: Page content overlapping

Posted 23 February 2010 - 05:53 PM

View Postinspectah, on 23 February 2010 - 04:21 PM, said:

:mellow: :mellow: :mellow: :mellow: :mellow: Need help



Eh, sorry inspectah, I don't do tables. Maybe someone else is here?
Was This Post Helpful? 0
  • +
  • -

#6 inspectah  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 27-April 09

Re: Page content overlapping

Posted 24 February 2010 - 03:07 AM

can you use something else? like a <div> to get the structure they way i want it?
Was This Post Helpful? 0
  • +
  • -

#7 Excavator  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 59
  • Joined: 10-December 06

Re: Page content overlapping

Posted 24 February 2010 - 09:54 AM

Good morning inspectah,
Does your table need to be that wide? Maybe an overflow:auto is what you need,
try this -
/******************************************** 
   LAYOUT 
********************************************/  
#wrap { 
        width: 790px; 
        background: #CCC url(content.jpg) repeat-y center top; 
        margin: 0 auto; 
        text-align: left; 
overflow: auto;
} 

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1