Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    258
    Thanks
    3
    Thanked 11 Times in 11 Posts

    CSS display problem! Overlapping div tags = CSS hates me...

    Hi, me again! :'(
    I don't know how to fix this problem...
    http://www.firemelt.net/crow/

    CSS:
    Code:
    .text_body_box_declare
    {
    	background-color: #ffffff;
      	margin-top: 0px;
      	margin-left: auto;
      	margin-right: auto;
      	margin-bottom: 0px;
    	border-style: solid;
    	border-bottom-style: none;
    	width: 200px;
    	border-width: 2px;
    	border-color: #0000ff;
    	padding-top: 1px;
    	padding-left: 5px;
    	padding-right: 5px;
    	padding-bottom: 1px;
    	text-align: center;
    }
    
    
    .text_body_box
    {
    	background-color: #ffffff;
      	margin-top: 0px;
      	margin-left: auto;
      	margin-right: auto;
      	margin-bottom: 10px;
    	border-style: solid;
    	border-width: 2px;
    	border-color: #0000ff;
    	width: 100%;
    	padding: 0px;
    }
    
    
    .text_body_box_date_time
    {
    	margin: 0px;
    	padding: 0px;
    }
    
    
    .text_body_box_date
    {
    	background-color: #ffffff;
      	margin-top: 0px;
      	margin-left: 0px;
      	margin-bottom: 2px;
      	border-width: 2px;
    	border-color: #0000ff;
    	border-style: solid;
    	border-top-style: none;
    	border-left-style: none;
    	width: 175px;
    	padding-top: 1px;
    	padding-left: 3px;
    	padding-right: 5px;
    	padding-bottom: 1px;
    	float: left;
    }
    
    .text_body_box_time
    {
    	background-color: #ffffff;
      	margin-top: 0px;
      	margin-left: 0px;
      	margin-right: 0px;
      	margin-bottom: 2px;
      	border-width: 2px;
    	border-color: #0000ff;
    	border-style: solid;
    	border-top-style: none;
    	border-right-style: none;
    	width: 75px;
    	padding-top: 1px;
    	padding-left: 3px;
    	padding-right: 5px;
    	padding-bottom: 1px;
    	float: right;
    }
    
    
    .text_body_box_text
    {
      	margin: 0px;
    	padding-left: 5px;
    	padding-right: 5px;
    	padding-top: 5px;
    	padding-bottom: 2px;
    }
    HTML:
    Code:
    <div class="text_body_box_declare">Welcome</div>
    <div class="text_body_box">
    	<div class="text_body_box_date_time">
    		<div class="text_body_box_date">September 31, 2009</div>
    		<div class="text_body_box_time">12:54 PM</div>
    	</div>
    	<div class="text_body_box_text">
    		Some text.
    	</div>
    </div>
    If you look at the blue boxes, the text should be under the date and time. It looks sorta like <div class="text_body_box_text"> is inside of <div class="text_body_box_date_time">.

    I tried display: block; thinking it would treat the two as a block and hoped <div class="text_body_box_date_time"> would stay underneath <div class="text_body_box_text">, but it didn't work...

    What should I do?
    Last edited by bobleny; 06-03-2007 at 12:16 AM. Reason: Because I can. Whats it to you!?
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,306
    Thanks
    29
    Thanked 277 Times in 271 Posts
    You, apparently, don’t understand how floats work. Text flows around floated elements, but it can still flow along the float’s side. Containing Floats is a good article relating the basics of how floats work.

    If you find this behavior to be undesirable, you can force subsequent elements below the floats. For example, to force an element below the nearest previous float in the indicated direction, you would use the clear property. Since you have floats in both directions that you want to clear, you would use the clear: both declaration.

    Code:
    .text_body_box_text { clear: both; }
    Also, though this is unrelated to your issue, you might want validate your document. Form control elements are not allowed as direct children of the form element under the Strict DTDs. You need to put a buffer element between them. Example:

    Code:
    <form …>
    	<div>…</div>
            <!-- or -->
            <fieldset>…</fieldset>
    </form>
    However, you don’t appear to be actually using the form element since you just filled in the action attribute with an erroneous URI (#). For that reason, you may want to omit it altogether; you could simply remove it or replace it with a more generic element such as a div or fieldset .

    Finally, you might want to put line breaks after each of your div elements and use indentation before them to make your code more readable.
    Last edited by Arbitrator; 06-03-2007 at 10:24 AM. Reason: I added more detail about the “form” element.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    258
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Thanks a lot!

    The link you gave me helped a lot!

    I always validate my source code, until now, I've ignored the errors that it gave about the <input>, because I didn't understand what they meant. I'm glade you explained to me. I was unaware that input fields needed to be in a container, not that I know why.
    ----------------------

    I had two other question about validation though, what do the warnings mean in my CSS?
    CSS Validation

    How come my HTML is validated as "Tentatively passed", why not regular pass?
    HTML Validation

    I'm sure it has something to do with this "character encoding" it keeps mentioning, but I don't know what that is or how to add it...
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    They are just that warnings. Its making sure you don't have text that has the same background color. Since the nav_links and right_links are in different elements you don't need to worry about those elements. I would try this for your CSS
    Code:
    html, body {
    background:#fff;
    height:100%;
    margin:0;
    padding:0;
    color:#000;
    line-height:15pt;
    word-spacing:2pt;
    font-family:courier;
    }
    
    #main_body {
    background:#fff;
    width:80%;
    min-height:100%;
    min-width:480px;
    margin:0 auto;
    padding:0;
    }
    
    .align_right {
    text-align:right;
    }
    
    .align_left {
    text-align:left;
    }
    
    .align_center {
    text-align:center;
    }
    
    .float_right {
    float:right;
    }
    
    .float_left {
    float:left;
    }
    
    .admin_text_edit {
    height:15px;
    margin:10px;
    bottom:0;
    left:0;
    }
    
    hr.short {
    background-color:#00f;
    width:40%;
    margin-left:0;
    margin-bottom:2px;
    }
    
    hr.long {
    background-color:#00f;
    width:100%;
    margin-left:0;
    margin-top:5px;
    margin-bottom:5px;
    }
    
    .login_input {
    margin:5px;
    }
    
    /* Start of Header ---------------------------------------------------- Start of Header */
    #header {
    background:#090;
    height:80px;
    position:relative;
    }
    
    #header_nav {
    position:absolute;
    bottom:0;
    left:0;
    }
    
    a.nav_links, a.nav_links:link, a.nav_links:visited {
    border:1px solid #00F;
    border-bottom:0;
    margin:0 3px;
    padding:1px 0;
    width:160px;
    color:#000;
    text-decoration:none;
    display:block;
    text-align:center;
    float:left;
    }
    
    a.nav_links:hover, a.nav_selected {
    border-color:#000;
    }
    a.nav_selected {
    background:#FFF;
    }
    
    /* End of Header -------------------------------------------------------- End of Header */
    /* Start of Right Panel ------------------------------------------ Start of Right Panel */
    #right_panel {
    width:140px;
    margin:10px 0 5px 0;
    float:right;
    }
    
    .right_panel_box {
    background:#960;
    margin:0 0 10px 0;
    border:1px solid #000;
    width:100%;
    padding:3px 2px;
    float:right;
    text-align:center;
    }
    
    .right_panel_text_lable {
    color:#000;
    line-height:15pt;
    word-spacing:2pt;
    font-family:courier;
    text-decoration:underline;
    text-align:center;
    }
    
    .right_panel_text {
    color:#000;
    line-height:15pt;
    word-spacing:2pt;
    font-family:courier;
    text-align:center;
    }
    
    .right_panel_link {
    margin-top:3px;
    }
    
    a.right_panel_link:link {
    color:#00f;
    text-decoration:underline;
    }
    
    a.right_panel_link:hover {
    background-color:#000;
    color:#960;
    text-decoration:underline;
    }
    
    /* End of Right Panel ---------------------------------------------- End of Right Panel */
    /* Start of Text Body ---------------------------------------------- Start of Text Body */
    #text_body {
    width:78%;
    margin:10px 0 5px 1px;
    float:left;
    display:inline;
    }
    
    .text_body_box_declare {
    background-color:#fff;
    margin:0 auto;
    width:200px;
    border:2px solid #00F;
    border-bottom:0;
    padding:1px 5px;
    text-align:center;
    }
    
    .text_body_box {
    background:#fff;
    margin:0 auto 10px;
    border:2px solid #00F;
    width:100%;
    padding:0;
    }
    
    .text_body_box_date {
    background:#fff;
    margin:0;
    border:2px solid #00F;
    border-top:0;
    border-right:0;
    width:175px;
    padding:1px 5px 1px 3px;
    float:left;
    }
    
    .text_body_box_time {
    background:#fff;
    margin:0;
    border:2px solid #00F;
    border-top:0;
    border-right:0;
    width:75px;
    padding:1px 5px 1px 3px;
    float:right;
    }
    
    .text_body_box_text {
    margin:0;
    padding-left:5px;
    padding-right:5px;
    padding-top:2px;
    padding-bottom:2px;
    display:block;
    clear:both;
    }
    
    /* End of Text Body -------------------------------------------------- End of Text Body */
    Its what you have already but its been optimized using shorthand notation and fixed a few bugs that IE had (double margin bug, look it up).

    As to the tentatively passed. Add this within the head part of your document.
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,306
    Thanks
    29
    Thanked 277 Times in 271 Posts
    Quote Originally Posted by bobleny View Post
    I always validate my source code, until now, I've ignored the errors that it gave about the <input>, because I didn't understand what they meant. I'm glade you explained to me. I was unaware that input fields needed to be in a container, not that I know why.
    Yeah, the DTD says “no”, so that’s the basic “why”. Why the authors of HTML 4.01 felt the need to make that a requirement though is escapes me. Maybe they were trying to encourage use of the fieldset and legend elements.

    Quote Originally Posted by bobleny View Post
    I had two other question about validation though, what do the warnings mean in my CSS?
    CSS Validation
    Those are just to warn you about possible color conflicts.

    For one, it's common that authors don’t bother to test their pages with images off; a lot of times you end up with sites that are hard to read or not readable at all when images are off (of before they’re downloaded). A glaring example of this is the popular gaming Web site, IGN.com, which has had this problem for as long as I can remember. If you want to be able to test with images disabled easily, I suggest downloading the Web Developer extension for Firefox and using the “Images > Replace Images with Alt Attributes” command; you can use that to test the quality (and presentation) of your alt text simultaneously.

    The second reason for the warning is to ensure that your colors work when the user has specified default colors for the background, text, and hyperlinks (visited and unvisited states). I find that a lot of sites assume that the default background color is white, the default text color is black, the default unvisited hyperlink color is blue, and the default hyperlink visited color is purple. I actually spent several weeks browsing with colors off of the defaults and found that a lot of sites were unreadable. For example, with my default text color of lavender (light purple) on a default background color of black, sites that only specified the background color (to be white) would end up with lavender text on white. You can test this stuff for yourself by going to “Tools > Options > Options tab > Fonts & Colors > Advanced button” in Firefox. Internet Explorer et al have similar options. The general rule of thumb is that, if you specify any text or background colors, you need to specify them (including hyperlink colors) for the current and and all child elements.

    Anyway, now you know. No one ever explains those warnings (even the validator) since the explanations take a long time.

    Quote Originally Posted by bobleny View Post
    How come my HTML is validated as "Tentatively passed", why not regular pass?
    HTML Validation

    I'm sure it has something to do with this "character encoding" it keeps mentioning, but I don't know what that is or how to add it...
    Basically, if your document contains mis‐encoded characters, it automatically fails validation. Since you didn’t declare the encoding, whatever reads your document (browser, validator, script, etc.) may fall‐back to the wrong encoding. It just happened to fall back to the right one when the validator read it.

    With regard to fixing it, you need to find out what your document encoding is. It’s typically ISO-8859-1. You can take a guess that this is right if you use no special or foreign (to English and west European language) characters. If you can’t find out or don’t want to guess, then you can save the document again and make sure that you choose the settings. In Windows, the ISO encoding gets listed as ANSI. Different editors have different ways of doing it; some let you change it when you save and others from a menu. Personally, I would recommend UTF-8; this is the default with XHTML (as XML) and it can represent every character in every language directly typed into the file.

    You can declare (but not encode) it by using:
    • HTTP headers sent by your server or configured via server language like PHP. This is the most compatible, while correct, method.
    • <?xml version="1.0" encoding="UTF-8"?>: The XML declaration is the officially recommended and most correct method of specifying the encoding for an XHTML document. It’s not often used because it triggers quirks mode in Internet Explorer 6. That issue was fixed in version 7. Note that Internet Explorer still does not support (real) XHTML even though it recognizes (and ignores) the declaration now.
    • <meta http-equiv="Content-Type" name="text/html; charset=UTF-8"/>: This method is generally wrong and should not be relied upon in XHTML. It’s ignored under real XHTML. It works fine in HTML (and XHTML as HTML) though.
    These difficulties are one of the many reasons that I promote HTML over XHTML. Few people have a clue how to use XHTML correctly.

    ------------

    I really need to collect my thoughts and write this stuff down somewhere. I find my self re‐explaining it over and over.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #6
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    258
    Thanks
    3
    Thanked 11 Times in 11 Posts
    I've liked the idea of being able to add that "Validated as XHTML 1.0 Strict" tag on my sites, but I never can!

    For example, the following line won't pass validation. I get 2 errors and I have no idea what to do about them...
    <form action='index.php?page=admin&admin=edit' method='post'>

    It has a problem with the "=" (equal) signs and the "&" (and) symbol.

    ------
    Here use this code with the validator:
    http://validator.w3.org/
    Code:
    <!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">
    	<head>
    		<link href="css.css" rel="stylesheet" type="text/css" />
    		<title>Home - Go MAD</title>
    	</head>
    	<body>
    		<div id="main_body">
    			<!-- Start of Header -->
    
    			<div id="header">
    				<div id="header_nav">
    					<div class='nav_selected'>Home Page</div><a href='index.php?page=base' class='nav_links'>Knowledge Base</a><a href='index.php?page=admin' class='nav_links'>Admin Panel</a>				</div>
    			</div>
    			<!-- End of Header -->
    
    			<!-- Start of Right Panel -->
    
    			<div id="right_panel">
    				<div class="right_panel_box">
    					<div class="right_panel_text_lable">Related Links</div>
    					<div class='right_panel_link'><a href='http://www.google.com' class='right_panel_link'>Google</a></div><div class='right_panel_link'><a href='http://www.yahoo.com' class='right_panel_link'>Yahoo!</a></div>				</div>
    
    				<div class="right_panel_box">
    					<div class="right_panel_text_lable">Login</div>
    
    					You are now logged in! <form action='#' method='post'><div class='login_input'><input type='submit' name='logout' value='Log Out' /></div></form>				</div>
    			</div>
    			<!-- End of Right Panel -->
    
    
    			<!-- Start of Text Body -->
    			<div id="text_body">
    				<div class='text_body_box_declare'>Date / Time</div><div class='text_body_box'><div class='text_body_box_date'>June 03, 2007</div><div class='text_body_box_time'>3:31 PM</div><div class='text_body_box_text'>The date / Time fields have been fixed! This means that when you have text like this, it will be under the date and time rather that between the date and time; It looks a lot better.<br />
    
    <br />
    Mean while, I am working on the Admin Panel. You won't be able to see it, but it will be nice. You will just have to take my work on it!<br />
    <br />
    Later, I will add a calender to the right side of this. It will come in handy!<div class='admin_text_edit'><div class='float_right'><form action='index.php?page=admin&admin=delete' method='post'><div class='hidden'><input type='hidden' name='id' value='20' /></div><div class='hidden'><input type='hidden' name='page' value='home' /></div><div class='login_input'><input type='submit' name='delete' value='Delete' /></div></form></div><div class='float_right'><form action='index.php?page=admin&admin=edit' method='post'><div class='hidden'><input type='hidden' name='id' value='20' /></div><div class='hidden'><input type='hidden' name='page' value='home' /></div><div class='login_input'><input type='submit' name='edit' value='Edit' /></div></form></div></div></div></div><div class='text_body_box_declare'>Pointless</div><div class='text_body_box'><div class='text_body_box_date'>June 03, 2007</div><div class='text_body_box_time'>2:56 PM</div><div class='text_body_box_text'>Here is some meaning less text, who's sole purpose is to create a paragraph, so that people may see what happens when a paragraph is displayed in this blue box. You should note that the first couple lines of the paragraph are between the date and time. This is not a good thing, it looks like crap. This text should appear under the date and time, but for some reason it is somewhat sharing the space. I don't quite understand it.<div class='admin_text_edit'><div class='float_right'><form action='index.php?page=admin&admin=delete' method='post'><div class='hidden'><input type='hidden' name='id' value='19' /></div><div class='hidden'><input type='hidden' name='page' value='home' /></div><div class='login_input'><input type='submit' name='delete' value='Delete' /></div></form></div><div class='float_right'><form action='index.php?page=admin&admin=edit' method='post'><div class='hidden'><input type='hidden' name='id' value='19' /></div><div class='hidden'><input type='hidden' name='page' value='home' /></div><div class='login_input'><input type='submit' name='edit' value='Edit' /></div></form></div></div></div></div><div class='text_body_box_declare'>Lets Roll!</div><div class='text_body_box'><div class='text_body_box_date'>June 02, 2007</div><div class='text_body_box_time'>9:11 PM</div><div class='text_body_box_text'>Hey hot stuffs, lets roll!<div class='admin_text_edit'><div class='float_right'><form action='index.php?page=admin&admin=delete' method='post'><div class='hidden'><input type='hidden' name='id' value='18' /></div><div class='hidden'><input type='hidden' name='page' value='home' /></div><div class='login_input'><input type='submit' name='delete' value='Delete' /></div></form></div><div class='float_right'><form action='index.php?page=admin&admin=edit' method='post'><div class='hidden'><input type='hidden' name='id' value='18' /></div><div class='hidden'><input type='hidden' name='page' value='home' /></div><div class='login_input'><input type='submit' name='edit' value='Edit' /></div></form></div></div></div></div><div class='text_body_box'><div class='text_body_box_text'>Page 1 </div></div><div class='add_post'><form action='index.php?page=admin&admin=add' method='post'><div class='hidden'><input type='hidden' name='page' value='home' /></div><div class='hidden'><input type='hidden' name='pt' value='Home' /></div><div class='hidden'><input type='hidden' name='date' value='June 03, 2007' /></div><div class='hidden'><input type='hidden' name='time' value='7:29 PM' /></div><div class='login_input'><input type='submit' name='add_new' value='Add New Post' /></div></form></div><hr class='long' /><div class='text_body_box_declare'>Contact</div><div class='text_body_box'><div class='text_body_box_text'>The best way to contact me is via emial. <a href='mailto:bobloonytic@ncweb.com'>bobloonytic@ncweb.com</a></div></div>			</div>
    
    			<!-- End of Text Body -->
    		</div>
    	</body>
    </html>
    I don't suppose any knows what to do about that?
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...

  • #7
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by bobleny View Post
    I've liked the idea of being able to add that "Validated as XHTML 1.0 Strict" tag on my sites, but I never can!
    since Arbitrator is offline at the moment... Why are you wanting XHTML? Read an earlier post by Arbitrator: How to validate a page with javascript variables in the <head> section?

    Quote Originally Posted by bobleny View Post
    For example, the following line won't pass validation. I get 2 errors and I have no idea what to do about them...
    <form action='index.php?page=admin&admin=edit' method='post'>

    It has a problem with the "=" (equal) signs and the "&" (and) symbol.
    A literal ampersand is written as &amp;. You need to write like this:
    Code:
    <form action='index.php?page=admin&amp;admin=edit' method='post'>
    This is even necessary in HTML.

  • #8
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    258
    Thanks
    3
    Thanked 11 Times in 11 Posts
    This works:
    <form action='index.php?page=admin&amp;admin=edit' method='post'>

    Until you do this:
    echo "<form action='index.php?page=admin&amp;admin=edit' method='post'>";

    Then it turns back into this:
    <form action='index.php?page=admin&admin=edit' method='post'>

    Guh.... I don't know what to do about that.... This is no fun....
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Are you using an editor to add that? It should stay the way it is if you are using the "code" view of whatever editor you are using.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #10
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,306
    Thanks
    29
    Thanked 277 Times in 271 Posts
    Quote Originally Posted by bobleny View Post
    I've liked the idea of being able to add that "Validated as XHTML 1.0 Strict" tag on my sites, but I never can!
    It’s actually easier to get a valid HTML 4.01 Strict document, if you want to make things easier on yourself.

    Quote Originally Posted by bobleny View Post
    For example, the following line won't pass validation. I get 2 errors and I have no idea what to do about them...
    <form action='index.php?page=admin&admin=edit' method='post'>
    All ampersands need to be escaped in XHTML, even within script and style elements. In HTML 4.01, there is an exception where an ampersand doesn’t need to be escaped if immediately followed by certain characters, although the exception does not apply in this case (assuming that the document were HTML).

    Quote Originally Posted by bobleny View Post
    It has a problem with the "=" (equal) signs and the "&" (and) symbol.
    You probably know about the character entity references &amp; or &nbsp;. The validator (and browsers) are supposed to read your hyperlink URI as having the (nonexistent) entity reference &admin; since the ampersand character starts a new reference. (The equals sign (=) implicitly terminates the character entity reference in HTML since it’s not a valid entity reference character; in XHTML, this is simply an error since entity references are required to end with a semicolon (;).)

    Quote Originally Posted by koyama View Post
    since Arbitrator is offline at the moment... Why are you wanting XHTML? Read an earlier post by Arbitrator: How to validate a page with javascript variables in the <head> section?
    I would affirm the sentiment, of course. Avoid XHTML when possible unless you’re willing to give up on Internet Explorer users since Internet Explorer doesn’t support (real) XHTML. HTML 4.01 can do all of the same things as XHTML (as HTML) while being much more lenient. If you want to test drive real XHTML, try using the real file extensions of *.xhtml and *.xht or use the PHP header() method to change the Content-Type header to application/xhtml+xml.

    Quote Originally Posted by bobleny View Post
    This works:
    <form action='index.php?page=admin&amp;admin=edit' method='post'>

    Until you do this:
    echo "<form action='index.php?page=admin&amp;admin=edit' method='post'>";

    Then it turns back into this:
    <form action='index.php?page=admin&admin=edit' method='post'>

    Guh.... I don't know what to do about that.... This is no fun....
    In the spirit of practice (I’m a PHP newb), I used the echo method and got &amp; in the output as expected. _Aerospace_Eng_ is probably onto something.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #11
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    258
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Yeah, I finally got this, "&amp;", to echo. I think it wasn't uploading right....

    I don't use .xhtml or .xht because, I don't have a web page that isn't written almost entirely in PHP.

    Check this out:
    XHTML Validation
    CSS Validation
    ---------------

    I happy! I am working on the other pages that only the Admin can see... I am loading the page and copying the source code over to it.
    --------------------------------------

    I absolutely despise internet explorer, and I gave up all hope for it years ago. There isn't many Microsoft products that I do like. That includes windows, which is why I am on Linux.

    Unfortunately, the site I am working on will be mostly viewed on IE. I am not doing anything fancy though. It is all CSS except for the forms. It should be fine.
    --------

    There are many reasons I support XHTML over HTML:
    The biggest, I'm tired of looking at HTML that looks like this:
    <HtML>
    <BODY>
    <B><FONT COLOR=RED>Hello, I know not.</B></FONt>
    </HTML
    </body>

    *Then they wonder why it doesn't work. "Hmm.. Couldn't tell ya..."
    ------------

    Anyways thanks for your help!
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...

  • #12
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,306
    Thanks
    29
    Thanked 277 Times in 271 Posts
    Quote Originally Posted by bobleny View Post
    I don't use .xhtml or .xht because, I don't have a web page that isn't written almost entirely in PHP.
    Such was my guess and why I also suggested the PHP method. I wasn’t suggesting that you serve real XHTML to Internet Explorer either.

    However, you may notice significant problems when serving it correctly since real XHTML follows the rules of XML rather than HTML. For example, two commonly overlooked differences are (A) that the primary background must be applied to the html (not body) element in XHTML and (B) document.write() doesn’t work in any XML language, including XHTML. Note that a validator will not catch either of those problems.

    Quote Originally Posted by bobleny View Post
    Well done.

    Quote Originally Posted by bobleny View Post
    There are many reasons I support XHTML over HTML:
    The biggest, I'm tired of looking at HTML that looks like this:
    <HtML>
    <BODY>
    <B><FONT COLOR=RED>Hello, I know not.</B></FONt>
    </HTML
    </body>

    *Then they wonder why it doesn't work. "Hmm.. Couldn't tell ya..."
    The particular sample that you provided is not correct HTML and doesn’t provide a valid argument. Correct HTML:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    	"http://www.w3.org/TR/html4/strict.dtd">
    
    <html lang="en-Latn-US">
    	<head>
    
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    		<title>HTML 4.01 Strict Document</title>
    		<meta name="Author" content="Patrick Garies">
    		<meta name="Created" content="2007-06-04">
    		<style type="text/css">
    			* { margin: 0; padding: 0; }
    			html { background: white; color: black; }
    			p { margin: 1em; }
    		</style>
    
    	</head>
    	<body>
    
    		<p>This is a correctly written HTML document.</p>
    
    	</body>
    </html>
    As you can see, HTML can be just as well‐authored. On the other hand, XHTML (as HTML) can be just as poorly authored as a lot of HTML out there.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #13
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    258
    Thanks
    3
    Thanked 11 Times in 11 Posts
    True... Funny thing is, You really can't see my XHTML code anyways... Not that it matters, here is the only tags I am using.
    Code:
    <!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">
    	<head>
    		<link href="css.css" rel="stylesheet" type="text/css" />
    		<title></title>
    	</head>
    	<body>
    		<div><form><input /><textarea></textarea></form></div>
    		<a href></a>
    	</body>
    </html>
    I don't have any other tags.... Thats why I'm not to concerned about XHTML compatibility with IE...

    That is what I call pure CSS. The whole thing is done with CSS.

    Meeting the XHTML validation is nothing more to me than a challenge. It is something to strive for....
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...

  • #14
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I see you stuck with your long drawn out CSS using a lot of redundant things.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #15
    Regular Coder bobleny's Avatar
    Join Date
    May 2007
    Posts
    258
    Thanks
    3
    Thanked 11 Times in 11 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    I see you stuck with your long drawn out CSS using a lot of redundant things.
    Yeah, is that a problem? I'm not real good with CSS you know, and for me to use short hand is out of the question. I am not good with CSS so I tend to place redundancies only keep the browser(s) from doing anything unexpected....

    What would you recommend that I do? If you know of any detailed CSS guides, I would be more than happy to take a look.

    It is the detail that I need. Like, someone said, <div> is by default 100% of it's parent element. Is that default for IE 1.3?

    I need to know them kinds of things. Like floats, I didn't know that when they floated, they didn't expand their parent element. I wish I would of known that a long time ago!
    --www.firemelt.net--
    * No good deed goes unpunished.
    * Cheer up, the worst has yet to come...


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •