Jump to content

raimo

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by raimo

  1. Yes, You are 100% right, it is not "inside" of spirit of web standards, but still it is allmost only way to get new window open with XHTML 1.1 etc.The other way is manage as own DTDWe must do stinking things as use a-tag rel attribute as an target in code and then switch rel value to target value with JS and DOM, secretly in backside of state. I don't like do things like that but there is no other way, thanks to W3C.I have heard, there is still some (many) needs to get new window opened,in spite of that W3C says there is no any reason to open new window from document. :)In my opinnion W3C XHTML 1.1 is too strict to work as flexible anymore or work at all. It doesn't get into the spirit of easy way to publish things. ps. sorry, it's only my offtopic whine
  2. Ouh yes, we are .. :)If You really need to use hr -tag You can do it with JavaScript (until browsers supports it). But is it wiser use image or colorized p or some other element?Image as 1px X 1px to squeezed to size needed with width and height attributes is not bad way either. Old but still very usefull way to make lines is:Save image named as line.png (sized to 1x1 px etc) and tag:<img src="line.png" width="100%" height="2" alt="line" />Will made 100% long and 2px height "hr" to You.Javascript trick (XHTML 1.1 valid, and all other valid too)Put this to external JS-file (named as line.js), var hr = document.createElement('hr');hr.setAttribute('width', '70%');hr.setAttribute('height', 2);hr.setAttribute('class', 'hr1');// more attributes heredocument.getElementsByTagName("body")[0].appendChild(hr); And then where ever You need hr, insert tag:<script src="line.js" type="text/javascript"> //line</script>Yes, it is 100% valid XHTML 1.1 and all others too, because there is no hr-tag in code, but still hr will work as hr should. CSS can be used, there is class named hr1 nowUse to create XHTML 1.1 valid iframe, XHTML 1.1 valid target, etc. :(Works fine with all "new" browsers (I think, ie 5.x> + all others)But still, small colorized image within squeezing it to size needed is best way todraw lines.edit:As scott100 says, <hr /> is the right way with XHTMLstill my DOM example is not ugly, or is it?
  3. raimo

    Validation Error

    You are being messed with those small ' and " marks :)Should (must) be as:<xx dosome="doIt('string', 'other string');" dosomeother="kimis.car.color = 'silver';"></xx>I think, here is fixed version:<img id="contact2" src="images/contact.png" onMouseover="document.getElementById('contact2').src = 'images/contact2.png';" onMouseout="document.getElementById('contact2').src = 'images/contact.png';" border="0" alt="Contact Lenses" />
  4. raimo

    css not validating

    1. there is two unexpected p-tags (remove them):line 81 column 1 - Warning: trimming empty <p>line 88 column 1 - Warning: trimming empty <p>2. there is small (space) typo in fonts:font-family: "comic sans ms", sans- serif; sans- serif; must be as sans-serif;3 if You are using background-color You must use color too.I mean, there must be both, color and background-color all cases if other is:background-color: #FFFFFF;color: #C0C0C0;Very handy is inherit value with background (or with color):color: #C0C0C0;background-color: inherit;4. #container background-color:#d2b48c ;there is one space at the end of string, should bebackground-color:#d2b48c;No errors or warnings anymore.
  5. Reasons why and why not can be found in MSDN:Read The !DOCTYPE "Switch" part:http://msdn.microsoft.com/library/default....nhancements.asp :)edit:If You are using HTML transitional or frameset doctype You must use it with URL-part of DTD-tag to switch IE to "standard-compliant" mode.When Internet Explorer 6 or later is not in standards-compliant mode, it is in compatibility mode.DTD to switch IE better mode is:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">now margin: 0px auto; will work with IE6 without centering all in body-element.
  6. Seems as it works very well, but only if strict DTD is used with IE..But who is using transitional anyway?
  7. for all browsers:body{text-align: center; /* MSIE needs this */}#container{margin: 0 auto;width: 750px;text-align: left;} so div with ID "container" is now centered with all browsers..as far as I know, there is no other way to do it with MSIE.
×
×
  • Create New...