Jump to content

Recommended Posts

I have just finished commenting about 80 pages worth of code for my uni project, and now all of my divs are not aligning the way they should be according to the CSS. The css states that the main page content should be in a div called div.test which was all displaying fine and centrally before I commented, now it is going to the left of the page. I cant see anything wrong with the comments or any comments that are unclosed. Could someone please take a look and see if a fresh pair of eys can help me out??

<!--
Author: Ashley Robbins
Date last modified: 08/05/09
Page Description: 
-->

Link to comment
https://forums.phpfreaks.com/topic/158950-whats-wrong-with-my-divs/
Share on other sites

Dammit I tried posting the whole file not just the comment.....

/* CSS Document 
Author: Ashley Robbins
Date last modified: 08/05/09
Page Description: This is the css file for the front end of the website
*/

/*setting link colours*/
a:link {text-decoration: none; color:#FF6600} 
a:visited {text-decoration: none; color:#FF6600} 
a:hover {text-decoration: underline; color: #FF6600;}
a:active {text-decoration:none; color:#FF6600} 
a.speciallink {text-decoration: none; color:#FF6600}

a:link.toolbar {text-decoration: none; color: white} 
a:visited.toolbar {text-decoration: none; color: white} 
a:active.toolbar {text-decoration:none; color: white} 
a.speciallink.toolbar {text-decoration: none; color: white}

a:link.calendar {text-decoration:none; color:black}
a:visited.celendar {text-decoration:none; color:black}
a:active.calendar {text-decoration:none; color:black}
a.speciallink.calendar {text-decoration:none; color:black}

/*button background colour */
over.btnav { background-color: white;}

/*setting size and colours of headings */	
h1{ font-size:30px; color:#FF6600; font-family:Arial, Helvetica, sans-serif}
h2{ font-size:18px; color:#000000; font-family:Arial, Helvetica, sans-serif}
h3{ font-size:14px; color:#FF6600; font-family:Arial, Helvetica, sans-serif}
h4{ font-size:20px; color:#FF6600; font-family:Arial, Helvetica, sans-serif}
h5{ font-size:14px; color:#000000; font-family:Arial, Helvetica, sans-serif}
h6{ font-size:16px; color:#FF6600; font-family:Arial, Helvetica, sans-serif}

/*setting font for body text */
body{font-family:Arial, Helvetica, sans-serif}

/*image border colour */
img.small {border-color:#FF6600;}

/*setting background image for totaliser */
img.totaliser{background-image:url(totaliser.php);}
img.totaliservertical{background-image:url(totalisertest.php);}

/*div to hold page contents centralised */
div.test {	

   			width : 1000px;
   			margin-left: auto;
		margin-right: auto;
		margin:0px;
		margin:auto;
		position:relative;
				}
/*div for calendar on events page */					
div.events {
height:500px;
width:650px;
margin:0px;
margin:auto;
position:absolute;
left:12px;
align:left;
top: 82px;
		}
/*div for small stories in archive */			
div.archive {
		width:500px;
		margin:0px;
		margin:auto;
		left:0px;
		align:left;
		position:absolute;
		}
/*div for links on parents page */			
div.parentslinks{
		width:500px;
		margin:0px;
		margin:auto;
		left:0px;
		align:left;

		}
/*div to display staff details centrally on page */			
div.staff {
		height:700px;
		width:600px;
		margin:0px;
		margin:auto;
		}
/*div to display facilities centrally */			
div.facilities {
		width:800px;
		margin:0px;
		margin:auto;
		}
/*div to show latest events on right of page */			
div.latestevents {
height:350px;
width:330px;
margin:1px;
margin:auto;
border-color:#FF6600;
border-left-style:solid;
border-left-width:thin;
position:absolute;
right:0px;
margin-top:40px;	
align:right;
padding-left:10px;

		}
/*div for body text on home page */			
div.forhometext{
		height: 250px;
		width:500px;
		margin:auto:
		}
/*div for recent donations on fundraising news page */			
div.fordonations{

		height: 400px;
		width:230px;
		border-color:#FF6600;
		border-left-width:thin;
		border-left-color:;
		border-left-style:solid;
		padding-left:10px;			
		}

/*formatting background and colour of submit form buttons */			
input.submit {
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
color:#FF6600;
background-color:#FFFFFF;
margin-left:0px;
border-width:0;  
cursor:pointer;
}

td.parentslinks{
			padding-left:20px;
			}

#wrapper {margin:0; margin:auto; width : 1000px;}

/*setting up elements for rounded bordered divs */
.bl{background: url(Static_Images/bl.gif) 0 100% no-repeat; width: 15em;}
.br {background: url(Static_Images/br.gif) 100% 100% no-repeat}
.tl {background: url(Static_Images/tl.gif) 0 0 no-repeat} 
.tr {background: url(Static_Images/tr.gif) 100% 0 no-repeat; padding:10px}
.t {background: url(Static_Images/dot.gif) 0 0 repeat-x; width: 15em}
.b {background: url(Static_Images/dot.gif) 0 100% repeat-x}
.l {background: url(Static_Images/dot.gif) 0 0 repeat-y}
.r {background: url(Static_Images/dot.gif) 100% 0 repeat-y}

I just tried to validate with w3c css validator and there are problems with your styles - there is no css style called "align:left". Use "text-align: left;" your div.forhometext has a colon instead of a semi-colon. there are others as well. Download the web developers toolbar for firefox and go to tools > validate css and it will line item any errors.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.