PDA

View Full Version : problem with 4.01 trans validation


bazz
08-07-2003, 11:30 PM
Hi.

I'm trying to validate to HTML 4.01 Transitional. I am geeting the following faults in it and dont understand whay or what to use instaed.

Can you help?
Below are the results of attempting to parse this document with an SGML parser.

Line 13, column 29: required attribute "TYPE" not specified (explain...).
<SCRIPT LANGUAGE="JavaScript">
^
Line 46, column 12: there is no attribute "BORDER" (explain...).
<A BORDER="0" HREF="http://www.domain name" onFocus="if
^
(this.blur)this.blu

In case it doesnt come out right, The arrow indicator is meant to be under the closing > after javascript and the other beneath the 1st " of border"0"

If border is unacceptable, what can I use to make sure the placeholders do not show. What am I missing from the javascript line?

Bazz

skinme!
08-07-2003, 11:42 PM
Placeholders on images? Get rid of them by adding BORDER="0" to the IMG tag. And you need a type="text/javascript" in your script tag.

bazz
08-08-2003, 12:19 AM
I tried the border="0" but and the validator doesn't recognise the term border. So I moved it to my css file and it doesn't do what I want. :confused:

I've done the text/javascript thing and its good -

Thanks.

bazz

skinme!
08-08-2003, 12:23 AM
What type of element is in the A href? An img? Something else? What do you mean by placeholders?

I currently have img { border: none; } in my CSS file and it does stop imgs having borders.

bazz
08-08-2003, 12:25 AM
aaaaagh. :o

I had in my css {border: 0;}

I mustnt recall correctly, coz I validated my css a while ago. :rolleyes:

skinme!
08-08-2003, 12:28 AM
So it works now? BTW, that would've worked if you provided a unit, like px.

bazz
08-08-2003, 01:38 AM
Yeh, it works well. I have now validated successfully my html and (except for the scrollbars colouring), the css. :) :thumbsup:

ronaldb66
08-08-2003, 08:58 AM
that would've worked if you provided a unit, like px. No; when value 0 is used, no units are required. It'll work just fine without any.
Also, "none" is not a valid value for the border property; "0" is.

meow
08-08-2003, 09:12 AM
Is too! :)

'border' is shorthand for 'border-style', 'border-width' and 'border-color'. 'none' is a valu for 'border-style' and the most correct way say you want no border (since border-style is required for the browser to draw a border it's logical to use them same property to tell it not to). So there! :D

giz
08-09-2003, 12:44 AM
Run it through http://jigsaw.w3.org/css-validator/validator-uri.html and you'll soon see who is right.

bazz
08-09-2003, 06:48 PM
Might the validator be wrong :)

This is my external style code which validates OK.

.iframe {height: 318px; border-right-style: inset; border-top-style: inset; border-left-style: inset; border-bottom-style: inset; margin-top: 0px; margin-right: 0px; overflow: visible; left: 200px; width: 278px; background-color: transparent;
}


I have assigned the same class to the iframe in my dynamic page but the only parts that seem to be being applied to the page are the dimensions and the absolute positioning. The surround arounf the iframe is as normal (default) :mad:

In case I have my container wrong in the html, here it is also.

<!-- START OF BODY TEXT-->
<p class="maintext">
<iframe class="iframe" name="iframetext" src="http://www.ireland-info.com/waterford_guesthouses/arlingtonlodge/intro.htm">
</iframe></p>
<!--END OF BODY TEXT-->

Can you help this buffoon?

skinme!
08-09-2003, 09:08 PM
You should probably add some lengths and colors to your border properties. For example:

border-left: 2px inset #FF0000;

That's a 2 pixel inset red border. (Notice the border-left instead of border-left-style).

And as all your borders (top, left, right, bottom) are meant to be the same (I assume), you can use:

border: 2px inset #FF0000;

This will set all four borders and all three properties of each (-width, -style, -color) at once. Nifty!

Is that the only part of your style sheet not being applied? I think adding lengths and colours should solve it.

bazz
08-10-2003, 01:31 AM
Thanks Skinme. :thumbsup:

I still get the default border around the iframe (like a bevelled recess), and then around that a 2px red border. Still, it's more css control than I got before, so I shall play about with it a bit more - perhaps looking for a word other than 'inset'.

When I put the code into the script for the dynamic page, I can get exactly what i want; the appearance that the text is on the page rather than in a iframe.

skinme!
08-10-2003, 03:11 AM
http://www.w3.org/TR/CSS2/box.html#border-style-properties

What kind of border do you want? And do you have an online example we could look at?

bazz
08-10-2003, 03:26 AM
I dont want a border but then perhaps border is the wrong term. Y'know the edge that you get with an iframe? Well I want it removed, preferably using external css. I have succeeded by putting it in the html of my page so that the text looks like its hard coded on that page when in fact its in an iframe.

Earlier, I read the page you linked me to but couldnt get the same effect. I was able to get a 2px red border around the iframe but not to get rid of the iframe appearance.

page here (http://www.ireland-info.com/cgi-bin/accommodation.pl?dpt=marlfield_dpt)

I hope it looks the same in your browser as it does in mine.

skinme!
08-10-2003, 03:58 AM
Where is the IFRAME? On IE6/Win I see no border, apart from a green border which looks part of the design.

bazz
08-10-2003, 04:13 AM
The pagenyou looked at is how I want it to look. The iframe contains only the body text in the lighter 'panel' Youll see it as you click the links along the upper menu. This was achieved using inline styles but whe I move them to the external style sheet, the default edge appears for the iframe.

My inline style reads:


<p class="maintext">
<iframe class="iframe" name="iframetext" top="250px" left="302px" overflow="auto" width="279px" height="295px" frameborder="0" marginwidth="15px" marginheight="0px" src="http://www.ireland-info.com/wexford_countryhouses/marlfield/intro.htm" bgcolor="b4d9b4">
</iframe></p>

If I transfer it to external css the 'frameborder' part doesn't render. I cant find an alternative for it in css. Border as we discussed earlier puts a different border around the default iframe edging. :confused:

Bazz