473,473 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Bugs with CSS code.

19 New Member
Hello Folks. First, i must admit how helpful you have been since i signed up here. Thank you all.

Im following a PHP course and this is the code of the stylesheet


Expand|Select|Wrap|Line Numbers
  1. /*SITE COLORS :
  2.     #1A446C - Blue grey
  3.     #689DC1 - Light blue
  4.     #D4E6F4 - Very light blue
  5.     #EEE4B9 - Light tan
  6.     #8D0D19 - Burgundy
  7.  
  8. */
  9.  
  10. html { height: 100%; width: 100%; }
  11.  
  12. body { height: 100%; width: 100%; margin: 0; padding: 0; border: 0; background: #FFFFFF;
  13.        font: 13px/15px Verdana, Arial, Helvetica, sans-serif; }
  14.  
  15. img { border: none;} 
  16.  
  17. table, tr, td { border-collapse: collapse; vertical-align: top; 
  18.                 text-align: left; 
  19.                 font: 13px/15px Verdana, Arial, Helvetica, sans-serif; }
  20.  
  21. a {color: #8D0D19;}
  22.  
  23. #header{ height: 70px; text-align: left; background: #1A446C; color: #D4E6F4; }
  24.  
  25. #header h1 { padding: 1em; margin: 0; }
  26.  
  27. /*Note: IE 5 & 6 won't understand min-height */
  28.  
  29. #main {min-height: 600px; width: 100%; background: #EEE489; padding: 2em; }
  30. #footer { height: 2em; padding: 1cm; text-align: center;
  31.     background: #1A446C; color: #D4E6F4; }
  32.  
  33. table.bordered tr th, table.bordered tr td { border: 1px solid #000000;}
Now the page is supposed to turn out like this
What i intend to achieve.jpg

But this is the top of my page due to error.
Top of my own page due to css error.jpg


And the bott0m of my page due to error.
Bottom of my own page due to error.jpg



The MENU, is supposed to be up and not at the bottom.

Please help me, im not too proficient in CSS

Or is it a bug in the PHP?

And here are the header and footer codes. I hope they help too


HEADER
Expand|Select|Wrap|Line Numbers
  1.  <!DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.  
  5.         <title>Zoomie Gallery: Admin</title>
  6.         <link href="../stylesheets/main.css" media="all" rel="stylesheet" type="text/css"/>
  7.     </head>
  8.     <body>
  9.         <div id="header">
  10.             <h1>Your Zoomie Gallery: Admin</h1>
  11.         </div>
  12.         <div id="main">
  13.             </div>
  14.         </body>
  15.     </html>


FOOTER

Expand|Select|Wrap|Line Numbers
  1. </div>
  2. <div id="footer">Copyright <?php echo date("Y", time());?>, Timothy Emmanson. Nailancer</div>
  3.     </body>
  4. </html>
  5.  
  6. <?php if(isset($database)) {$database->close_connection();} //If the database connection is there, then close it?>


Thank you very much for your help
Feb 14 '15 #1
1 1400
talk2tim
19 New Member
Hey Folks!!! I have debugged it myself. It was indeed a HTML issue and not CSS. I was separated my header and footer and attached my layout to them so that wherever i include header or footer, the layout comes together with it. Pretty smart ei? Anyways, i was supposed to leave the html code on the header incomplete. i.e stop at main' and not close tags of body, head and html. That was why i ran into that error. I removed them those closing tags and Viola!!.


THIS

Expand|Select|Wrap|Line Numbers
  1. !DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.  
  5.         <title>Zoomie Gallery: Admin</title>
  6.         <link href="../stylesheets/main.css" media="all" rel="stylesheet" type="text/css"/>
  7.     </head>
  8.     <body>
  9.         <div id="header">
  10.             <h1>Your Zoomie Gallery: Admin</h1>
  11.         </div>
  12.         <div id="main">
  13.             </div>
  14.         </body>
  15.     </html>

WAS SUPPOSED TO BE THIS

Expand|Select|Wrap|Line Numbers
  1. !DOCTYPE html>
  2. <html lang="en">
  3.     <head>
  4.  
  5.         <title>Zoomie Gallery: Admin</title>
  6.         <link href="../stylesheets/main.css" media="all" rel="stylesheet" type="text/css"/>
  7.     </head>
  8.     <body>
  9.         <div id="header">
  10.             <h1>Your Zoomie Gallery: Admin</h1>
  11.         </div>
  12.         <div id="main">

Spent some more time on the code and figured out the issue. Thanks anyway. I hope someone else learns from it. :-)
Feb 16 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

83
by: kartik | last post by:
there seems to be a serious problem with allowing numbers to grow in a nearly unbounded manner, as int/long unification does: it hides bugs. most of the time, i expect my numbers to be small. 2**31...
35
by: Geronimo W. Christ Esq | last post by:
Are there any scripts or tools out there that could look recursively through a group of C/C++ source files, and allow unreferenced function calls or values to be easily identified ? LXR is handy...
14
by: Gernot Frisch | last post by:
Hi, we are forced to provide C++ sources to another company. Now, we want the interfaces to be accessable, but the contents of each method obfuscated. Is there any (free?) software that does...
20
by: Prashanth Badabagni | last post by:
hi, i'm prashanth Badabagni .. Can anyone tell me the BUGS present in C language whether programming or syntactical BUGS .... Thanks in advance ... Prashanth Badabagni
46
by: Profetas | last post by:
Hi, I know that this is off topic. but I didn't know where to post. Do you comment your source code while coding or after coding. for example: you write a procedure and after it is...
2
by: Nigel Sypouo | last post by:
Hello, I've just started programming with C++, and I'm looking for a way (function) to convert numbers (int,float or double) into ASCII. Thanks
245
by: Vortex Soft | last post by:
http://www.junglecreatures.com/ Try it and tell me what's happenning in the Microsoft Corporation. Notes: VB, C# are CLS compliant
7
by: Don Taylor | last post by:
Found in a style guide (http://www.artlogic.com/careers/styleguide.html) ----------------------------------------------------------------------- Another case where "unnecessary" braces should be...
2
by: TheSteph | last post by:
Using : Windows 2000 Pro SP4 / VS.NET 2005 / .NET 2.0 / C# - All updates done. I have several bugs when I use the DataGridView : When scrolling (or after scrolling) the grid have these...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.