 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Tue Nov 03, 2009 10:47 pm Text partly blanked out, uploads in form, movie format |
|
|
|
Hi everyone
Sometimes when I load my site the head (title) is blanked-out on the bottom half.
| Code: |
<head>
<title>hello</title>
<meta name="description" content="poetry" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="com.css" rel="stylesheet" type="text/css" />
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<!-- The heading row starts below this comment -->
<tr valign="top" class="headrow"> <!-- valign aligns text at the top when there are different font-sizes -->
<td width="200" height="165"><img src="images/worm1.jpg" width="214" height="165" alt="hello" />
</td>
<td nowrap><br clear="all" /> <!-- clear says that in addition to a line-break, if there is a picture or other object to the right or left, then go past that too. -->
<br />
<br />
<h1 class="heading">title</h1>
</td>
</tr>
</table>
</head> |
Also I have seen flashes where pressing the back button sometimes flashes a page in default text styles.
The fact that these problems happen some of the time, but not all the time is interesting.
I would also be happy to learn if anyone has a direct link to file uploads in a form emailed. Solutions do occur in search results, but none of them are a free and easy solution. Or is there?
Finally, I have a video capture of 100000 KB but no file extension. How can this be played online? what extension to cite? E.g. I have been able to use Windows Media Player.
Cheers |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Wed Nov 04, 2009 5:24 am |
|
|
|
| Is there possibly some styling in the com.css stylesheet that could be causing the problem? |
|
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Thu Nov 05, 2009 12:04 am |
|
|
|
Hi sticks464
I really am getting to know you--I think you answered my other question
No, the .css sheet looks harmless. I thought maybe the "blink" attribute might be causing the problem, but removing it has not helped. This is the code in .css for my title (h1=heading1):
| Code: |
h1 {
font-family: Georgia, "Times New Roman", Times, serif;
color: #000000;
font-size: 36px;
margin: 0px;
font-weight: bold;
font-style: italic;
<!--text-decoration: blink;--> |
These apparently "random" acts of misbehaviour are scary, eh?
marcxx |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Thu Nov 05, 2009 4:58 am |
|
|
|
Some browsers do not like the <br>'s your using. Another method to center the heading in the cell is valign.
| Code: |
<td nowrap valign="middle"> <!-- clear says that in addition to a line-break, if there is a picture or other object to the right or left, then go past that too. -->
<h1 class="heading">title</h1>
</td> |
Cells will expand to contain elements. Clearing and line breaks are not necessary to align elements. |
|
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Thu Nov 05, 2009 3:17 pm |
|
|
|
Thanks, sticks464, for your suggestion.
I tried your code (<br /> removed)
However:
Both valign="middle" and valign="bottom" blanks-out top AND bottom bits of the title text. (It's even worse.) valign="top" still blanks-out the top.
I don't have much experience in how general imperfections exist in coding, but I thank you for making me think a bit laterally. |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Thu Nov 05, 2009 3:27 pm |
|
|
|
| Instead of valign=top on that particular <tr>, add it to the first <td> that contains the image, then apply valign=middle to the <td> that contains the header text. Any alignment applied to the <tr> will over ride any alignment applied to the <td>'s in that row. I'm no expert on tables and they can be difficult at times. A good reason why they should not be used for page layout. |
|
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Thu Nov 05, 2009 6:42 pm |
|
|
|
Thanks sticks464,
I'm always happy to try suggestions (see code below). This time, top bit of text is blanked-out. On the computer I am using now (I use a few), my original code has no blank-out.
It may be a case of the better of two types of blank-out.
Thanks for your help again.
| Code: |
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<!-- The heading row starts below this comment -->
<tr class="headrow"> <!-- valign aligns text at the top when there are different font-sizes -->
<td valign="top" width="200" height="165"><img src="images/worm.jpg" width="214" height="165" alt=" " />
</td>
<td nowrap valign="middle"> <!-- clear says that in addition to a line-break, if there is a picture or other object to the right or left, then go past that too. -->
<h1 class="heading">title</h1>
</td>
</tr>
</table> |
|
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Thu Nov 05, 2009 8:43 pm |
|
|
|
Give this a try.
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title here</title>
<style type="text/css">
* {
margin:0;
padding:0;
}
table {
border-collapse: separate;
border-spacing: 0;
width:100%;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
img { width: 100%; height: 100%; border:0;}
.headrow {
height:165px;
vertical-align:middle;
overflow:visible;
}
.img_container {
width:200px;
vertical-align:top;
}
h1 {
font-family: Georgia, "Times New Roman", Times, serif;
color: #000000;
font-size: 36px;
margin: 0px 0px 0px 10px;
font-weight: bold;
font-style: italic;
}
</style>
</head>
<body>
<table cellspacing="0">
<!-- The heading row starts below this comment -->
<tr class="headrow"> <!-- valign aligns text at the top when there are different font-sizes -->
<td class="img_container"><img src="images/worm.jpg" alt=" " />
</td>
<td class="title">
<h1 class="heading">title</h1>
</td>
</tr>
</table>
</body>
</html> |
|
|
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Sat Nov 07, 2009 7:22 pm |
|
|
|
Your code works for me as it is. When I try to put it into my .css and comment-out absolutely everything that might interfere, it does the blanking thing again. It also repositions the image and title, and I can't locate the code which does this.
Even the old table code works okay without the .css reference. All your new code may just be misleading.
Conclusion seems to be that the problem is just the linking to the .css (?). Here is my .css (including latest comment-outs):
| Code: |
/* CSS Document */
<!--
body {
font-family: Georgia, "Courier New", Courier, monospace;
font-size: 14px;
background-color: #FFFFFF;
line-height: 2em;
margin-left: 200px;
margin-top: 50px;
margin-right: 200px;
}
.excerpt_uline {
margin-left: 70px;
margin-top: 0px;
margin-right: 70px;
font-style: italic underline;
font-family: cursive;
}
.sp {
font-family: Georgia, "Courier New", Courier, monospace;
font-size: 16px;
font-weight: bold;
color: #336699;
background-color: #FFFFFF;
/* background-image: "./images/wintersdawn.jpg";*/
}
a:link {
font-weight: bold;
}
a:visited {
color:#CC9966;
}
a:hover {
font-weight: bold;
}
a:active {
font-weight: bold;
color:#330033;
}-->
h1 {
font-family: Georgia, "Times New Roman", Times, serif;
color: #000000;
font-size: 36px;
margin: 0px 0px 0px 10px;
font-weight: bold;
font-style: italic;
<!--text-decoration: blink;-->
}
h2 {
font-family: "Courier New", Courier, monospace;
color: #000066;
font-size: 28px;
text-align: center;
}
h3 {
{
font-family: Georgia, "Courier New", Courier, monospace;
font-size: 16px;
font-weight: bold;
color: #000066;
text-align: left;
}
h4 {
font-family: "Courier New", Courier, monospace;
color: #000066;
font-size: 25px;
font-style: italic;
text-align: center;
}
h5 {
font-family: "Courier New", Courier, monospace;
color: #4169E1;
font-size: 25px;
font-style: italic;
text-align: center;
}
.h6 {
font-weight: bold;
}
address {
text-align: center;
}
.smallcaps {
font-variant: small-caps;
}
.nav1 {
text-align: center;
}
.notesrow {
background-color: #FFE4E1;
font-weight: 500;
}
<!--
img {
margin-right: 100px;
}-->
div {
margin-left: 40px;
margin-right: 40px;
}
<!--
td, th {
line-height: 1em;
color: #336699;
}-->
th1 {
line-height: 1em;
color: #F5FFFA;
}
th, th1 {
background-color: #F5FFFA;
color: #336633;
}
<!--New additions from trythistable.htm-->
img { width: 100%; height: 100%; border:0;}
.headrow {
height:165px;
vertical-align:middle;
overflow:visible;
}
.img_container {
width:200px;
vertical-align:top;
* {
margin:0;
padding:0;
}
table {
border-collapse: separate;
border-spacing: 0;
width:100%;
}
caption, th, td {
text-align: left;
font-weight: normal; |
|
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Sat Nov 07, 2009 11:09 pm |
|
|
|
I finally figured it out when I see your css. Several things need correction;
Setting line-height of 2em in the body is doing nothing. It gets over ridden with line-height set in the td, th styles. To correct this, remove line-height from the td, th and apply it only to the body. (By the way, line-height is what's causing the h1 to be partly blanked out in IE7.)
Using <!-- and --> inside the style tags will not work. You must use /* and */ to comment out elements.
All <a> styles are inherited from the a:link. Only change how the appearance will change with the hover, visited and active styles.
Only set font-family and font-size for heading tags. Apply color and other rules when used (as done with the h1).
Here's how it should look.
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
/*//////////////////////////////
// Resets
//////////////////////////////*/
* {
margin:0;
padding:0;
}
table {
border-collapse: separate;
border-spacing: 0;
width:100%;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
img { width: 100%; height: 100%; border:0px;}
/*//////////////////////////////
//Global Styles
//////////////////////////////*/
body {
font-family: Georgia, "Courier New", Courier, monospace;
font-size: 14px;
background-color: #FFFFFF;
color: #000;
line-height: 1em;
}
a:link {
font-weight: bold;
}
a:visited {
color:#CC9966;
}
a:hover {
}
a:active {
color:#330033;
}
h1 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 36px;
}
h2 {
font-family: "Courier New", Courier, monospace;
font-size: 28px;
}
h3 {
font-family: Georgia, "Courier New", Courier, monospace;
font-size: 16px;
}
h4 {
font-family: "Courier New", Courier, monospace;
font-size: 25px;
}
h5 {
font-family: "Courier New", Courier, monospace;
font-size: 25px;
}
.h6 {
}
address {
text-align: center;
}
.smallcaps {
font-variant: small-caps;
}
.nav1 {
text-align: center;
}
.notesrow {
background-color: #FFE4E1;
font-weight: 500;
}
/*////////////////////////////
// Page styles
////////////////////////////*/
.excerpt_uline {
margin-left: 70px;
margin-top: 0px;
margin-right: 70px;
font-style: italic underline;
font-family: cursive;
}
.sp {
font-family: Georgia, "Courier New", Courier, monospace;
font-size: 16px;
font-weight: bold;
color: #336699;
background-color: #FFFFFF;
/* background-image: "./images/wintersdawn.jpg";*/
}
.headrow {
height: 165px;
vertical-align: middle;
overflow visible;
}
.img_container {
width: 200px;
vertical-align: top;
}
div {
margin: 0 40px;
}
td, th {
color: #336699;
}
th1 {
color: #F5FFFA;
}
th, th1 {
background: #F5FFFA;
color: #336633;
}
.title {line-height: 2.6em;}
.title h1 {
margin-left: 10px;
font-style: italic;
color: #000;
}
</style>
</head>
<body>
<table cellspacing="0">
<!-- The heading row starts below this comment -->
<tr class="headrow"> <!-- valign aligns text at the top when there are different font-sizes -->
<td class="img_container"><img src="images/worm.jpg" alt=" " />
</td>
<td class="title">
<h1>title</h1>
</td>
</tr>
</table>
</body>
</html>
|
The color rule for th's needs resolved.
td, th {
color: #336699;
}
th, th1 {
background: #F5FFFA;
color: #336633;
}
For each change/addition made to html/css, checking with a browser will cut down on errors and ensure it is being displayed correctly. Since we all know IE displays different than other browsers it is essential that code is checked in a minimum of Safari (for PC), Opera, Google Chrome, IE7 and 8 (compatibility mode if using IE8) and Firefox to make sure it displays the same (or very close) in the most popularly used browsers. |
|
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Sun Nov 08, 2009 7:26 pm |
|
|
|
Hi sticks464
h1 is not in the body and should not be worried by body settings. I really want different line-heights for body, tables.
I think you've shown me how to get rid of unnecessary statements in the .css file.
But I'm not sure that your diagnosis is correct for blanks-out
Good wishes |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Sun Nov 08, 2009 8:34 pm |
|
|
|
Check the files I set you.
Your correct, the h1 is not in the body because there is no body tag which is incorrect coding. Again check the coding I emailed you.
First, after seeing your coding, you don't need a table to accomplish what you want.
Line height will effect the h1 because the pixel size for the h1 is greater that the pixel height set for the <td> which contains the h1 therefore blanking out the text that is not the same height as the line height size.
It is all corrected in the new files. |
|
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Mon Nov 09, 2009 3:10 pm |
|
|
|
Hi sticks464
I am following your new argument. Please note that no new files have been received as yet. |
|
sticks464

Joined: 31 Dec 2006 Posts: 2627
|
Posted: Mon Nov 09, 2009 8:58 pm |
|
|
|
Did you not send me 4 html files and a css file bu email?
I sent them back to the same email address as HTMLprob.zip.
I received them as HTMLprob.zipx |
|
marcxx
Joined: 01 Nov 2009 Posts: 14
|
Posted: Mon Nov 09, 2009 11:21 pm |
|
|
|
yes sticks464
(email was not marked unread. I found it though.)
You've done quite some redefining in the css. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|