homepage Welcome to WebmasterWorld Guest from 54.226.80.196
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Getting a line to show with HTML Validation/CSS
Validation sucks
Kate82




msg:564043
 8:36 pm on Nov 15, 2005 (gmt 0)

Okay, I am at the end of my rope on this one. I am trying desperately to recreate what is happening on my site now but having valid code.

Here is what is up now.

<td align="left" valign="top" bgcolor="#455979" height="100%"> <img src="../images/nav_blue.gif" alt="time and attendance" width="22" height="16">

<there is another table here, but shouldn't have any effect>

<table width="206" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="22"><img src="../images/nav_blue.gif" alt="time and attendance" width="22" height="100%"></td>
<td align="center" valign="top"><p>&nbsp;</p>
<p class="white_text">&nbsp;</p>
<p class="white_text">&nbsp;</p>
<p class="white_text">&nbsp;</p></td>
</tr>
</table> </td>

This is what I have cleaned it up to:

<td align="left" valign="top" bgcolor="#455979" height="100%">
<img src="../images/nav_blue.gif" alt="time and attendance" width="22" height="16">
<table width="206" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="22" height="100%"><img src="../images/nav_blue.gif" alt="time and attendance" width="22" height="100%"></td>
<td align="center" valign="top" height="100%"><p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></td>
</tr>
</table> </td>

Why won't my white line show?

[edited by: tedster at 1:36 am (utc) on Nov. 16, 2005]

 

JAB Creations




msg:564044
 6:44 am on Nov 16, 2005 (gmt 0)

The only reference I see to white are your paragraph classes, so by that I am assumming you are refering to those paragraphs? Try putting some text there if that is the case.

If not you'll have to post a more full working version of your page...

To validate I need to know what level of (x)html you're aiming for, it looks to me like HTML 4.01 Transitional?

If you are using an XHTML doctype you have to start getting in to the habbit of using adjective like attributes strictly (or at least stricter depending on which version) in your CSS.

Also in XHTML you must end all elements. Image and meta tags are examples that confuse most (as they do not have second tags meant to mark the end)...

<meta name="" content="" />
<img alt="bob" src="bob.gif" />

Just add a space and a trailing slash, the space and slash are required.

Let me help you cut down on the junk and make things a bit cleaner for you...

HTML 1
<table width="206" border="0" cellspacing="0" cellpadding="0" height="100%">

HTML 2
<table class="changethis">

CSS to go with HTML 2
table.changethis {
border: 0px;
border-collapse: collapse;
height: 100%;
width: 206px;
}

border-collapse: collapse; is the equiv to cellspacing and cellpading (both set to 0).

If you never want any cellspacing or cellpadding on any of your tables ever then just do this...

table {
border-collapse: collapse;
}

Don't feel like you're at the end of your rope! This is the only forum I ever really read and it's helped me come a hell of a long way in the just over one year I've been here. This stuff btw is pretty easy and I am VERY surprised no one replied by now! I will recieve email notifications when anyone replies to help you out further.

Validation rocks btw! You may not know it now but if you stick to validation you'll learn how code works better then you do now. I'm up to XHTML 1.1 with a mimetype of application/xhtml+xml ... and ONE error...ANY error...the page will NOT render (it will go blank and say, ERROR!) So HTML/CSS is a pretty easy transition, especially since programs can make it for you. We are here for you! :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved