Coder Profile - Show off your skills, get a coder profile.
 
 
 
  
Posted: 302 Days Ago 

FallingTears
United States
Contrib Level: 5
Total Posts: 208
Guys,

I can't figure out how to center a field set using CSS. It doesn't render in Firefox or IE. HELP Mee!!

Basically, I have a DIV (id is header) that contains the logo div (contains logo image) and login box div (contains web form). Well, I'm having a difficult time centering the form or anything in the form. What I would like to do is center the whole form (including the fieldset) within my document. I tried the text-align property, but it isn't working, which is kind of ticking me off. I do NOT want to use absolute positioning. There are many reasons for this.

All help is much appreciated.

Sam
Posted: 302 Days Ago 

FallingTears
United States
Contrib Level: 5
Total Posts: 208
What I did worked in IE, but it's not working with Mozilla ... there has to be a fix for Mozilla:
Posted: 302 Days Ago 

FallingTears
United States
Contrib Level: 5
Total Posts: 208
Okay, I got Google Chrome, Firfox, Safari, and Internet Explorer .....

My website is compatible with IE. Everything displays properly with IE.

My website doesn't display properly with the other three. I know there's something that I'm missing ... there has to be ... for my website to work in all four of the web browsers. If you want to take a look at my site:

http://www.skstidh.us

If you want to take a look at my CSS

http://css.skstidh.us/main.css

This will give you some idea of what's going on and perhaps you'll be able to help me get it to render properly with those other three.

Thanks in advance,
Sam
Posted: 302 Days Ago 

FallingTears
United States
Contrib Level: 5
Total Posts: 208
The solution is simple, I finally got it. The form and fieldset are centered on the page. Very soon, I'm going to be uploading all of my files to my website. Take a look at my website: http://www.skstidh.us ... This website is not in competition with CoderProfile. My site is more/less being created for portfolio purposes.

This works for IE, Opera, Firefox, Safari, and Google Chrome:
CODE: main.css Copy / Restore  ::  Remove Scroll Bars
  1.  
  2. body {
  3.                                         background: url("../images/bg.gif") repeat;
  4.                                     }
  5.  
  6. #header {
  7.                 width: 100%;
  8. text-align: center;
  9. }
  10.  
  11. #footer {
  12. width: 100%;
  13. text-align: center;
  14. margin-top: 10px;
  15. }
  16.  
  17. form {
  18. width: 680px;
  19. margin-top: 0px;
  20. margin-left: auto;
  21. margin-right: auto;
  22. }
  23.  
  24. fieldset {
  25. text-align: center;
  26. }
  27. fieldset legend {
  28. text-align: left;
  29. }
  30.  
CODE: index.php Copy / Restore  ::  Remove Scroll Bars
  1.  
  2. <?php
  3.  
  4. // Import Page class
  5. include("./includes/page.php");
  6.  
  7. // Instantiate Page Class
  8. $page = new Page("WebGrease Framework 1.01 - Home Page");
  9.  
  10. // Begin XHTML 1.0 Strict Document
  11. print "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
  12.  
  13. ?>
  14.  
  15. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  16.  
  17. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  18.  
  19. <head>
  20. <title><?php $page->displayTitle(); ?></title>
  21. <link href="./css/main.css" rel="stylesheet" type="text/css" />
  22. </head>
  23.  
  24. <body>
  25.  
  26. <?php $page->displayHeader("./includes/header.php"); ?>
  27.  
  28. <?php $page->displayFooter("./includes/footer.php"); ?>
  29.  
  30.  
  31. </body>
  32. </html>
  33.  
CODE: header.php Copy / Restore  ::  Remove Scroll Bars
  1.  
  2. <div id="header">
  3.  
  4. <div id="logo">
  5. <img src="../images/logo.gif" usemap="#myMap" alt="WebGrease Framework 1.01 Logo" style="border-width: 0px" />
  6.  
  7. <map name="myMap">
  8. <area shape="rect" coords="261,64,316,81" alt="Home Page" href="./index.php" />
  9. <area shape="rect" coords="330,64,399,81" alt="Programming Articles" href="http://articles.skstidh.us" />
  10. <area shape="rect" coords="414,64,471,81" alt="Source Codes" href="http://codes.skstidh.us/" />
  11. <area shape="rect" coords="487,64,571,81" alt="Development Blog" href="http://blog.skstidh.us/" />
  12. <area shape="rect" coords="587,64,653,81" alt="Our Forums" href="http://forums.skstidh.us/" />
  13. <area shape="rect" coords="669,65,720,81" alt="User Control Panel" href="http://accounts.skstidh.us/" />
  14. </map>
  15.  
  16. </div>
  17.  
  18. <div id="log_box">
  19. <form action="./login_process.php" method="post">
  20. <fieldset id="myFieldSet">
  21. <legend>Log In</legend>
  22. Username: <input type="text" id="username" />
  23. Password: <input type="password" id="password" /><br />
  24. <span style="font-size: 12px">Not a user? <a href="./register.php">Register</a></span>
  25. </fieldset>
  26. </form>
  27. </div>
  28.  
  29. </div>
  30.  
CODE: footer.php Copy / Restore  ::  Remove Scroll Bars
  1.  
  2. <div id="footer">
  3. <div id="footer_image">
  4. <img src="../images/footer.gif" alt="Footer Image" />
  5. </div>
  6. </div>
  7.  
See, simple.
Posted: 300 Days Ago 

VBAssassin
United Kingdom
Contrib Level: 17
Total Posts: 5,709
Ewwww
CODE: Copy / Restore  ::  Remove Scroll Bars
  1. // Begin XHTML 1.0 Strict Document
  2. print "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
  3.  
  4. ?>
  5.  
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
You really should refactor that   

Since your doing a framework based on objects, i would recommend you checkout the zend framework before creating your own. It's easy to use, it took me less thyan 3 hours to create a 3 page website using the zend framework.

Kind regards,
Scott
Posted: 300 Days Ago 

FallingTears
United States
Contrib Level: 5
Total Posts: 208
XHTML 1.0 Strict isn't too difficult to deal with

I've taken a look at several frameworks ... and I know that their classes are easily extendable, but my main concern is .... how will I really learn PHP by using someone elses work? My PHP database connections are much better now than they were several months ago. My registration/validation scripts are bug-less.

One thing that I've been trying to figure out is creating php configuration files, because I want to make a PHP setup script ... which will start out with the user supplying basic database information (server name, admin username, admin password, and database). Anyways, you get the idea.

I bought 2 PHP books, one is for PHP 5 and the other is for PHP 6, both include MySQL 5 support. They're helping me so much.

P.S

Hehe, I'm going to make the installation file allow the user to choose which form of validation he/she wants ... and I'm going to include all the files needed for every form of validation, except for frameset. I don't like frames very much.
Page 1 of 1
 
 
Latest News About Coder Profile
Coder Profile Poll
If you made money from keeping your profile up to date, say $30 and up, per month. What extra time would you spend on your profile?

No extra time
A few hours at weekends
A whole day each week
Every minute i can get free


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
1.67 Year Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2010, Scott Thompson, All Rights Reserved