Forum Moderators: open

Message Too Old, No Replies

Text/image alignment problems

         

WombatReaper

9:01 pm on Aug 7, 2007 (gmt 0)

10+ Year Member



Hey guys, this is a really humiliating thing to need help with, but it's starting to really bug me. I'm trying to simply align some text over to the right side of an image. I can do it, yes, and it works, somewhat. I look at my page in FireFox, and it's decent enough, but I still want to push the text over a little bit, but that's not a huge deal. But when I look at it in IE, the picture has completely vanished. Here's the code that I've most recently tried:


<h1>Derrick Swerhone</h1>
<p><br>
<img src="image/Derrick.gif" align="left" alt="Derrick Swerhone"> Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee! Dummy text, wheee!<br><br>
</p>

Any help would be most appreciated.. I'm almost 100% sure that the problem is some tiny thing that I keep overlooking, but oh well. Thanks in advance.

tedster

9:22 pm on Aug 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try using a css style instead of align="left"

<img style="float:left;margin-right:20px;">

You can tweak the margin-right amount to your heart's content.

WombatReaper

9:27 pm on Aug 7, 2007 (gmt 0)

10+ Year Member



That works great for the alignment and everything, but I still have the problem with the picture not showing up in IE. Whenever I take out the align="left" or the code you just gave me, it comes back. Any suggestions for that?

tedster

4:11 am on Aug 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm guessing the problem must be elsewhere in your mark-up, this kind of situation is really, really common. So the problem is probably coming because either there is an error elsewhere in the code, or the layout as a whole is triggering an IE bug.

Have you validated your HTML and CSS?

W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]

WombatReaper

7:13 pm on Aug 9, 2007 (gmt 0)

10+ Year Member



Well, my CSS is relatively fine, just a few conflicting colors and suc, nothing much to worry about, but it said my HTML code had 71 errors. When I look at the errors though, I get extremely confused, because they aren't real errors, as far as I know. Here's all the errors it gave me:


# Error Line 28, Column 71: there is no attribute "color".

…myspace.com">Avalon<span><font color="#FFFFFF">Architecture</font></span><a/>

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
# Error Line 28, Column 80: element "font" undefined.

…om">Avalon<span><font color="#FFFFFF">Architecture</font></span><a/></small><

You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:

* incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

# Error Line 28, Column 110: document type does not allow element "a" here; missing one of "object", "ins", "del", "span", "bdo", "tt", "i", "b", "big", "small", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "sub", "sup", "label" start-tag.

…FFFFFF">Architecture</font></span><a/></small></h1>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
# Error Line 28, Column 118: end tag for "a" omitted, but OMITTAG NO was specified.

…Architecture</font></span><a/></small></h1>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 28, Column 14: start tag was here.

<h1><small><a href="http://www.myspace.com">Avalon<span><font color="#FFFFFF"

# Error Line 30, Column 48: end tag for "small" omitted, but OMITTAG NO was specified.

<li><a href="Contact.html"><small>Contact</a></li>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 30, Column 31: start tag was here.

<li><a href="Contact.html"><small>Contact</a></li>

# Error Line 35, Column 40: end tag for element "small" which is not open.

<li><a href="index.html">Home</small></a></li>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.
# Error Line 62, Column 11: end tag for "br" omitted, but OMITTAG NO was specified.

<p><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 62, Column 7: start tag was here.

<p><br>

# Error Line 63, Column 90: end tag for "img" omitted, but OMITTAG NO was specified.

…/Derrick.gif" alt="Derrick Swerhone"> <fieldset style="border:6px solid WHITE

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 63, Column 0: start tag was here.

<img style="float:left;margin-right:20px;" src="image/Derrick.gif" alt="Derrick

# Error Line 63, Column 132: document type does not allow element "fieldset" here; missing one of "object", "ins", "del", "map" start-tag.

…ldset style="border:6px solid WHITE;">Dummy text, wheee! Dummy text, wheee! D

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
# Error Line 63, Column 546: end tag for "br" omitted, but OMITTAG NO was specified.

…ee! Dummy text, wheee!</fieldset><br><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 63, Column 542: start tag was here.

… wheee! Dummy text, wheee!</fieldset><br><br>

# Error Line 63, Column 550: end tag for "br" omitted, but OMITTAG NO was specified.

…Dummy text, wheee!</fieldset><br><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 63, Column 546: start tag was here.

…ee! Dummy text, wheee!</fieldset><br><br>

# Error Line 65, Column 8: end tag for "br" omitted, but OMITTAG NO was specified.

<br><br><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 65, Column 4: start tag was here.

<br><br><br>

# Error Line 65, Column 12: end tag for "br" omitted, but OMITTAG NO was specified.

<br><br><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 65, Column 8: start tag was here.

<br><br><br>

# Error Line 65, Column 16: end tag for "br" omitted, but OMITTAG NO was specified.

<br><br><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 65, Column 12: start tag was here.

<br><br><br>

# Error Line 67, Column 11: end tag for "br" omitted, but OMITTAG NO was specified.

<p><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 67, Column 7: start tag was here.

<p><br>

# Error Line 68, Column 48: end tag for "img" omitted, but OMITTAG NO was specified.

<img src="image/george.gif" alt="George Harlan"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 68, Column 0: start tag was here.

<img src="image/george.gif" alt="George Harlan"><br><br></p>

# Error Line 68, Column 52: end tag for "br" omitted, but OMITTAG NO was specified.

<img src="image/george.gif" alt="George Harlan"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 68, Column 48: start tag was here.

<img src="image/george.gif" alt="George Harlan"><br><br></p>

# Error Line 68, Column 59: end tag for "br" omitted, but OMITTAG NO was specified.

<img src="image/george.gif" alt="George Harlan"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 68, Column 52: start tag was here.

<img src="image/george.gif" alt="George Harlan"><br><br></p>

# Error Line 71, Column 11: end tag for "br" omitted, but OMITTAG NO was specified.

<p><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 71, Column 7: start tag was here.

<p><br>

# Error Line 72, Column 47: end tag for "img" omitted, but OMITTAG NO was specified.

<img src="image/lisa.gif" alt="Lisa Finlayson"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 72, Column 0: start tag was here.

<img src="image/lisa.gif" alt="Lisa Finlayson"><br><br></p>

# Error Line 72, Column 51: end tag for "br" omitted, but OMITTAG NO was specified.

<img src="image/lisa.gif" alt="Lisa Finlayson"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 72, Column 47: start tag was here.

<img src="image/lisa.gif" alt="Lisa Finlayson"><br><br></p>

# Error Line 72, Column 58: end tag for "br" omitted, but OMITTAG NO was specified.

<img src="image/lisa.gif" alt="Lisa Finlayson"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 72, Column 51: start tag was here.

<img src="image/lisa.gif" alt="Lisa Finlayson"><br><br></p>

# Error Line 75, Column 11: end tag for "br" omitted, but OMITTAG NO was specified.

<p><br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 75, Column 7: start tag was here.

<p><br>

# Error Line 76, Column 50: end tag for "img" omitted, but OMITTAG NO was specified.

<img src="image/Sherry.gif" alt="Sherry Whiteley">

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 76, Column 0: start tag was here.

<img src="image/Sherry.gif" alt="Sherry Whiteley">

# Error Line 77, Column 8: end tag for "br" omitted, but OMITTAG NO was specified.

<br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 77, Column 4: start tag was here.

<br><br></p>

# Error Line 77, Column 15: end tag for "br" omitted, but OMITTAG NO was specified.

<br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 77, Column 8: start tag was here.

<br><br></p>

# Error Line 80, Column 8: end tag for "br" omitted, but OMITTAG NO was specified.

<br>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 80, Column 4: start tag was here.

<br>

# Error Line 82, Column 45: end tag for "img" omitted, but OMITTAG NO was specified.

<img src="image/jason.jpg" alt="Jason Selby"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 82, Column 0: start tag was here.

<img src="image/jason.jpg" alt="Jason Selby"><br><br></p>

# Error Line 82, Column 49: end tag for "br" omitted, but OMITTAG NO was specified.

<img src="image/jason.jpg" alt="Jason Selby"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 82, Column 45: start tag was here.

<img src="image/jason.jpg" alt="Jason Selby"><br><br></p>

# Error Line 82, Column 56: end tag for "br" omitted, but OMITTAG NO was specified.

<img src="image/jason.jpg" alt="Jason Selby"><br><br></p>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 82, Column 49: start tag was here.

<img src="image/jason.jpg" alt="Jason Selby"><br><br></p>

# Error Line 28, Column > 80: XML Parsing Error: Opening and ending tag mismatch: a line 28 and small.

…om">Avalon<span><font color="#FFFFFF">Architecture</font></span><a/></small><…

# Error Line 28, Column > 80: XML Parsing Error: Opening and ending tag mismatch: small line 28 and h1.

…om">Avalon<span><font color="#FFFFFF">Architecture</font></span><a/></small><…

# Error Line 30, Column 49: XML Parsing Error: Opening and ending tag mismatch: small line 30 and a.

<li><a href="Contact.html"><small>Contact</a></li>

# Error Line 30, Column 54: XML Parsing Error: Opening and ending tag mismatch: a line 30 and li.

<li><a href="Contact.html"><small>Contact</a></li>

# Error Line 35, Column 41: XML Parsing Error: Opening and ending tag mismatch: a line 35 and small.

<li><a href="index.html">Home</small></a></li>

# Error Line 35, Column 45: XML Parsing Error: Opening and ending tag mismatch: li line 35 and a.

<li><a href="index.html">Home</small></a></li>

# Error Line 37, Column 8: XML Parsing Error: Opening and ending tag mismatch: h1 line 28 and div.

</div>

# Error Line 64, Column 8: XML Parsing Error: Opening and ending tag mismatch: br line 63 and p.

</p>

# Error Line 68, Column 60: XML Parsing Error: Opening and ending tag mismatch: br line 68 and p.

<img src="image/george.gif" alt="George Harlan"><br><br></p>

# Error Line 72, Column 59: XML Parsing Error: Opening and ending tag mismatch: br line 72 and p.

<img src="image/lisa.gif" alt="Lisa Finlayson"><br><br></p>

# Error Line 77, Column 16: XML Parsing Error: Opening and ending tag mismatch: br line 77 and p.

<br><br></p>

# Error Line 82, Column 57: XML Parsing Error: Opening and ending tag mismatch: br line 82 and p.

<img src="image/jason.jpg" alt="Jason Selby"><br><br></p>

# Error Line 84, Column 9: XML Parsing Error: Opening and ending tag mismatch: br line 82 and div.

</div>

# Error Line 85, Column 8: XML Parsing Error: Opening and ending tag mismatch: img line 82 and div.

</div>

# Error Line 86, Column 7: XML Parsing Error: Opening and ending tag mismatch: p line 81 and div.

</div>

# Error Line 93, Column 7: XML Parsing Error: Opening and ending tag mismatch: br line 80 and body.

</body>

# Error Line 95, Column 7: XML Parsing Error: Opening and ending tag mismatch: br line 77 and html.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag img line 76.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 75.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag p line 75.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 72.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag img line 72.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 71.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag p line 71.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 68.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag img line 68.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 67.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag p line 67.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 65.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 65.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 65.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 63.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag img line 63.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag br line 62.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag p line 62.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag div line 60.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag div line 41.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag div line 40.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag div line 26.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag body line 25.

</html>

# Error Line 95, Column 7: XML Parsing Error: Premature end of data in tag html line 3.

</html>

Marshall

7:22 pm on Aug 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you copied and pasted the results exactly, I noticed one error on the top:
…myspace.com">Avalon<span><font color="#FFFFFF">Architecture</font></span><a/>

Should be </a>. Also, what doctype are you using?

Marshall