Old 06-21-2007   #1 (permalink)
Registered User
 
LostReflections's Avatar
 
Join Date: Jan 2007
Location: North Carolina
Posts: 17

Send a message via AIM to LostReflections
HTML Code Acting Weird - HELP!

Okay, so I'm building a website and I'm having a problem with a divider object. It works perfectly except the top line of text is appearing in a black font, and I've checked the code a good 50 times making sure there are no errors in it.

<div style="width: 489px; height: 380px; overflow: scroll;border: 0px dashed black;>
<font color="ffffff">
<font face="Verdana">
<font size=1>
<b>May.27.2007</b>
<br>
</div>

There's the code for that particular part. Any reason why this would happen?
LostReflections is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 06-21-2007   #2 (permalink)
Registered User
 
Join Date: Aug 2004
Posts: 119

HORRIBLE code.

Code:
<div style="width: 489px; height: 380px; overflow: scroll; border 0;">
<span style="color: #fff; font: bold 10px Verdana, san-serif;">May.27.2007</span>
<br />
</div>
You can not have a 0px border that is colored. if there's no border it's just 0, don't even need the px.


Your code is a mix of really bad HTML and some CSS. The code above is all CSS. If you REALLY want to stick to the horrible code. Add # at the beginning of the font color (#ffffff) and add closing font tags below the text <font><font><font><b>Date</b></font></font></font> Although i really woud not recommend this method of coding
Jolt is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-17-2007   #3 (permalink)
Steven
 
Join Date: Jun 2005
Location: McAlester, OKlahaoma - United States
Posts: 21

Seperate Stylesheet

Quote:
Originally Posted by Jolt View Post
HORRIBLE code.

Code:
<div style="width: 489px; height: 380px; overflow: scroll; border 0;">
<span style="color: #fff; font: bold 10px Verdana, san-serif;">May.27.2007</span>
<br />
</div>
You can not have a 0px border that is colored. if there's no border it's just 0, don't even need the px.


Your code is a mix of really bad HTML and some CSS. The code above is all CSS. If you REALLY want to stick to the horrible code. Add # at the beginning of the font color (#ffffff) and add closing font tags below the text <font><font><font><b>Date</b></font></font></font> Although i really woud not recommend this method of coding

I have to agree with Jolt, and say your css is very poorly written. It's my opinion that inserting css into your html page with the style=" " tag is very sloppy, and unorganized. I suggest making a seperate stylesheet that contains all css aspects of your html page. Then include the css stylesheet into your html page.

For example you could make a special div in a stylesheet just for your divider object. (Look below.)

Code:
#divider {
font-family: Verdana, san-serif;
font-size: 10px;
font-weight: bold;
color: #FFFFFF;
width: 489px;
height: 380px;
border: #000000 0px solid; 
}
I know Jolt said that if your border was 0px there wasn't any need to write it in your code. Jolt does post many helpful, and very correct posts. But it just depends on how you organize your border, and where you put it. If you set it up just right, and enter 0px as the size it shouldn't conflict with anything.

I mentioned above about making a seperate stylesheet. Here is an example of a very simple stylesheet.


Code:
style type="text/css">
a:link {
color: #000000;
text-decoration: underline;
}

a:hover {
color: #000000;
text-decoration: none;
}

body {
color: #000000;
font-size: 12;
font-family: Verdana;
}

#divider {
font-family: Verdana, san-serif;
font-size: 10px;
font-weight: bold;
color: #FFFFFF;
width: 489px;
height: 380px;
border: #000000 0px solid; 
}
</style>
To apply this stylesheet to an html page place the code below in the <head></head> section of your html page.

Code:
<link rel="stylesheet" href="style.css" type="text/css">
And for one last example... Here is an example of an html table using the #divider div tag from the example stylesheet.

HTML Code:
<table width="489" height="380" div id="divider">
<tr>
<td width="489">Table Content</td>
</tr>
</table>
__________________
--
Steven
basicwe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ: A Complete Membership System scrowler BioRUST Specific Threads 13 01-19-2007 12:16 AM
PHP in HTML ultranet HTML / PHP / ASP / JS 3 01-04-2007 10:07 AM
How to code HTML 4.01 Strict Neil_8_24_93 HTML / PHP / ASP / JS 5 08-25-2006 04:57 PM
HTML Madness kits HTML / PHP / ASP / JS 10 05-03-2006 03:07 PM
Scroll bar code Stiker HTML / PHP / ASP / JS 9 04-19-2004 01:44 PM


All times are GMT +1. The time now is 05:45 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT