Jump to content

HTML Table with (rowspan atr.) does not align correctly


nomnex

Recommended Posts

Can you help me sort this out?Look at the print screen, point 1, and point 2: the table does not align correctly. Can you explain me why?I enclose a print-screen and the .html file in a zip file, link: HTML files and Print Screen , since we cannot upload files on the board. I have checked several times and tried with different rowspan="" attribute values, but not to avail. What bothers me is:

Line 51<td rowspan="9">HTML & CSS tutorials</td>
when the correct value should be "8".The .html table is too big to past its content in "code" on this post, however I link the print-screen in the ZIP archive, on the post below:printscreen_01_g8QXaJ.pngThank you the an expert eyes to point out the mistake and to explain it to me, because I could really couldn't find any.
Link to comment
Share on other sites

as far i can see, is it just a little extra space bumping each one down? Could be the combination of borders being added together. The bottom border of the top element and the top border of the bottom element.

Link to comment
Share on other sites

as far i can see, is it just a little extra space bumping each one down? Could be the combination of borders being added together. The bottom border of the top element and the top border of the bottom element.
thank you for your answer. So you confirm there is no error in the HTML tags on my end? and nothing to correct? I might need to split one big table into 2 or 3 maybe? Lastly, could the output be different according to the browser, or not?
Link to comment
Share on other sites

I was thinking you just target one of the cells and remove it's top or bottom border, depending on whether or not its the top element or the bottom element.as far as errors, I have no idea without the code. You can always validate your own code though.

Link to comment
Share on other sites

He did say he had it the code in a link. Though I think most of us (at least me anyway) are hesitant to download files from others. Nothing against you nomnex or anyone else. :) Just gotta be careful on the net these days. :) Maybe you could post small portions of the table where the issues arise (like maybe the first row) and your relevant CSS.

Link to comment
Share on other sites

He did say he had it the code in a link. Though I think most of us (at least me anyway) are hesitant to download files from others. Nothing against you nomnex or anyone else. :) Just gotta be careful on the net these days. :) Maybe you could post small portions of the table where the issues arise (like maybe the first row) and your relevant CSS.
yeah, i know, but you made my point for me. :)
Link to comment
Share on other sites

Even on Win there are excellent available solutions for people concern by their security. I give some you surely might know.- http://www.sandboxie.com/ (free sandbox)- http://www.virustotal.com/ (online-scan)- http://virusscan.jotti.org/en (online-scan)And you might all have up to date anti-virus. I am on the forum to ask assistance. I created an archive with a clear description (.jpg + .html--HMTL tags only) and I explained why (no file upload on the board). I have already 32 posts mainly to ask beginners questions and some of you here already answered. What are the odds I use a forum channel to pack and (re-)distributed a Windows malware?a long table HTML text file is also convenient, you can open it in your text editor and have the markup tags in colors. I thought it might help to pin-point a small mistake. But anyway, I past the .html in the next post (you will have to scroll to read it). if you need more information, the (safe) download link is still valid.and ShadowMage, my questions is about table alignment (i.e. is there a mistake with in my Tags, at any level?). I have triple-checked (even sent the file to the W3C validation, it returns no mistake--or I don't read the result correctly--and I see not mistakes myself). It is a simple big fat HTML table (I don't learn CSS yet).I really go by the book with the W3S tutorials, and I do them thoroughly. I suspect a glitch with my "rowspan" value on line 51 (see my first post). Someone with a better HTML level than mine should be able to find the problem quickly. Thanks for helping.

Link to comment
Share on other sites

Line 51 on the page is Line 8 here: <td rowspan="9">. I believe the correct value should be "8". So, something wrong here. If I use the "8" value the table breaks. With value "9" the upper table suffer alignment problem.

<!-- web topics by languages --> <table border="5" align="center" frame="vsides" cellpadding="3" cellspacing="3" width="80%">	<tr>		<th colspan="3">			WEB TOPICS		</th>	</tr>	<tr>		<td rowspan="9">			HTML & CSS tutorials		</td>	</tr>	<tr>		<td rowspan="2">			HTML		</td>		<td style="background:lightgrey">			<a href="html_topics.html">basic</a>		</td>	</tr>	<tr>		<td style="background:red">			<a href="html_topics.html">advanced</a>		</td>	</tr>	<tr>		<td>			HTML5		</td>		<td>			full		</td>	</tr>	<tr>		<td>			XHTML		</td>		<td>			full		</td>	</tr>	<tr>		<td rowspan="4">			CSS		</td>		<td>			basic		</td>	</tr>	<tr>		<td>			styling		</td>	</tr>	<tr>		<td>			box model		</td>	</tr>	<tr>		<td>			advanced		</td>	</tr>	<tr>		<td rowspan="13">			XML tutorial		</td>		<td rowspan="13">			XML		</td>	</tr>	<tr>		<td>			basic		</td>	</tr>	<tr>		<td>			DTD		</td>	</tr>	<tr>		<td>			DOM		</td>	</tr>	<tr>		<td>			XSL		</td>	</tr>	<tr>		<td>			XSLT		</td>	</tr>	<tr>		<td>			XSL-FO		</td>	</tr>	<tr>		<td>			Xpath		</td>	</tr>	<tr>		<td>			Xquery		</td>	</tr>	<tr>		<td>			Xlink		</td>	</tr>	<tr>		<td>			Xpointer		</td>	</tr>	<tr>		<td>			Schema		</td>	</tr>	<tr>		<td>			Xforms		</td>	</tr>	<tr>		<td rowspan="7">			Browser scripting tutorials		</td>		<td rowspan="3">			JavaScript		</td>		<td>			basic		</td>	</tr>	<tr>		<td>			objects		</td>	</tr>	<tr>		<td>			advanced		</td>	</tr>	<tr>		<td>			DHTML		</td>		<td>			full		</td>	</tr>	<tr>		<td rowspan="3">			Ajax		</td>		<td>			basic		</td>	</tr>	<tr>		<td>			XMLHttpRequest		</td>	</tr>	<tr>		<td>			advanced		</td>	</tr>	<tr>		<td rowspan="8">			Server Scripting tutorials		</td>		<td rowspan="5">			PHP		</td>		<td>			basic		</td>	</tr>	<tr>		<td>			advanced		</td>	</tr>	<tr>		<td>			database		</td>	</tr>	<tr>		<td>			XML		</td>	</tr>	<tr>		<td>			PHP and AJAX		</td>	</tr>	<tr>		<td rowspan="3">			SQL		</td>		<td>			basic		</td>	</tr>	<tr>		<td>			advanced		</td>	</tr>	<tr>		<td>			functions		</td>	</tr>	<tr>		<th colspan="4">			Screen resolution 1152 x 864 on a 15' LCD		</th>	</tr></table>

Link to comment
Share on other sites

Case solved.I have fixed my table by splitting it by section, and comparing each block.it was indeed redundant pairs of <tr></tr> tags, and wrong rowspan values to balance the table with the redundant tags.the W3C HTML check was not returning an error because opening and closing tags were corrects.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...