jimgilbert Posted December 28, 2008 Share Posted December 28, 2008 Hi all, I am a newbe and am having trouble with the most basic of things.I have this in my stylesheet: p {font-family: "Lucida Console"; font-size: 1em; color: white; }p.center {text-align: center}p.normal {font-weight: normal}p.thick {font-weight: thick}p.italic {font-style: italic}p.boxed {border-style: solid}p.boxed1 {border-style: dashed}p.boxed2 {border-style: double solid}p.strong {text-transform: uppercase; font-weight: bold; }p.footer {text-align: center;}p.footer2 {font-size: .5em; text-align: center; } And this in the index.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html lang="en"><head> <title>Client Tracker Home Page</title> <meta name='keywords' content='real estate transaction tracking,real estate client tracking' /> <meta name='description' content='ClientTracker is a profit-generating solution that works to keep track of your clients and transactons, automate routine office tasks, track performance of your agents, and provide tools that support communications with current and prospective clients and other real estate agents, escrow agents, title agents, and mortgage agents.' /></HEAD><link href="tracker1.css" rel="stylesheet" type="text/css"><style type="text/css"><BODY> </style> <p class="footer"><?php include("menu2.php")?></p> <p class="boxed1"><?php include("copyright.php")?></p> <p class="footer2"><?php include("copyright.php")?></p> <p class="footer2">Copyright 2004-2008 Desert Star Land LLC</p></BODY> </HTML> That is the entire index page at present. All I am trying to do is to get the footers (one menu, one copyright notice) to display with the correct font, centered, and sized smaller for footer2.If you look at my page www.theclienttracker.com you will see that it doesn't work. The <p>'s act right when I hard-code the text into the document but not when I use an include.Is this something that should be done with div tags instead? I dont' quite understand the difference between the two methods. I have read and re-read the w3 tutorials but I have to say they aren't all that great imo. Like a lot of toots they don't show real-world examples. Like the page on div tags for example. They show an in-line example but not how to use them in a style sheet. Maybe I am just too confused at this point but that is my opinion..thanks for any helpJim Link to comment Share on other sites More sharing options...
jeffman Posted December 28, 2008 Share Posted December 28, 2008 One problem is that some important tags are out of sequence: </HEAD><link href="tracker1.css" rel="stylesheet" type="text/css"><style type="text/css"><BODY> </style> It should read like this: <link href="tracker1.css" rel="stylesheet" type="text/css"> <style type="text/css"> </style></HEAD><BODY> Of course the style tags here aren't even needed since there are no definitions inside.In the document, I find this inline declaration: <div class="menu" style="width: 886; height: 34">. Since you're using a strict doctype, you need to add units after the numbers.Also, there is no pseudo class called :plain, and no font-weight called thick.It is also customary today (and required in XHTML) to keep all tag and attribute names and values in lowercase.EDIT:Oh, yes. You have <html> tags in some of your include files (copyright.php, anyway). Since included data is simply embedded into the middle of a document (think copy and paste) additional <html> tags are incorrect.And I notice a <div> inside a <p>. Normally, it's the other way around. Link to comment Share on other sites More sharing options...
jimgilbert Posted December 28, 2008 Author Share Posted December 28, 2008 Thanks very much. I am closer now. Most of what you saw before was copied from examples I saw, including the placement of the link to the stylesheet and of the </style> tag after the <body> tag. It didn't really make sense to me, but that is what the example had. I deleted the size declarations in the menu (actually thought I had deleted that earlier). It is now working right for the second include (copyright) but not the first (menu). I first started the page layout using tables but then, after much work, I find out we shouldn't be using tables for this page layout. When I did the same thing using td classes it worked right though."Of course the style tags here aren't even needed since there are no definitions inside."Not sure what you mean by this... no definitions inside the head? "And I notice a <div> inside a <p>. Normally, it's the other way around."OK, the only way I can get that changed is to make the menu2 like this (but it still doesn't pick up the desired attributes): <div class="menu"> <a href="http://www.theclienttracker.com/index.php">Home</a> <a href="http://www.theclienttracker.com/login.php">Login</a> <a href="http://www.theclienttracker.com/aboutus.html">About Us</a> <a href="mailto:info@theclienttracker.com">Contact Us</a></div> Thanks again,Jim Link to comment Share on other sites More sharing options...
Synook Posted December 29, 2008 Share Posted December 29, 2008 Not sure what you mean by this... no definitions inside the head?No definitions inside the <style> block... it's empty: <style type="text/css"></style>. Link to comment Share on other sites More sharing options...
jimgilbert Posted December 29, 2008 Author Share Posted December 29, 2008 Ah, I see now. Thanks. To clarify for myself, is this where I could add more definitions that are just for this document? Link to comment Share on other sites More sharing options...
jeffman Posted December 29, 2008 Share Posted December 29, 2008 Ah, I see now. Thanks. To clarify for myself, is this where I could add more definitions that are just for this document?Yes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.