I got it to pull in the master page. I included a lot of stuff from another
site that I wrote in php and the stuff before and after what is in the
Content file is in html. (As a learning experience I am trying to redo this
site using ,net and aspx). I ran into several problems:
1 - How do I specify the style sheet? The CssClass value is not defined is
the message I get.
2 - It doesn't recognize <embed>. I have a Flash stuff at the top.
3 - In <td> it says that "height" is obsolete and that I should use a newer
one. What is the newer one? I tried style="height=35". However, doesn't
whatever is in the "style" have to be in double quotes, so how would one
enclose the "35"?
4 - It says that "background" is invalid in <td>. Since I point to an image
file, which appears in the browser by the way, what is the proper one to
use? Obviously, it must be getting it because when I test it, the image
appears.
5 - It say that "img" requires the "alt" tag. I currently don't have one.
What should I use?
6 - It also says that bgcolor is outdated. Again, what is the replacement?
Is there somewhere that you can point me to find out what all the
replacements are and their syntax?
7 - Ditto for "align" in <div>
Thanks.
Shelly
the style should be coded as
style="height:35;"
>I got it to pull in the master page. I included a lot of stuff from
>another site that I wrote in php and the stuff before and after what is in
[quoted text clipped - 41 lines]
>>>
>>> .... or please tell me how to do those things.
<snip />
> Is there somewhere that you can point me to find out what all the
> replacements are and their syntax?
<snip />
Damn. They call it the web and all your questions can be discovered using
your preferred search engine to search the web. It sounds like you need A
LOT of help with basic HTML. Your questions are no longer about aspnet.
<%= Clinton
Shelly - 02 Sep 2007 03:13 GMT
> <snip />
>> Is there somewhere that you can point me to find out what all the
[quoted text clipped - 6 lines]
>
> <%= Clinton
1 - I know **basic** html. My daughter would do all the pretty stuff
(html), and I would do all the programming and talking to the database and
database design (php, mysql).
2 - The question was about what to put into "alt". I searched the web
FIRST, but the question I had was rather specific. So, after not finding
it, I asked the experts who would probably know it off the top of their
heads. One did - leave it blank as "".
3 - I have progressed to where I am putting just about everything into css.
Some of the translations are not straightforward (such as cellpadding and
cellspacing), but on the whole it has been simple. I simply defined some
new class values in the style sheet.
My next questions will be more specifically on ASP.NET, but I had to get to
this point.
Thanks everyone for their help so far.
Shelly
As mentioned before, a lot of these are basic HTML and CSS questions, so
you would probably do well to get a book on standards-based web design,
as that would help immensely.
>1 - How do I specify the style sheet? The CssClass value is not
>defined is the message I get.
A few ways...
1) Add a <link> tag in the <head> section of your HTML. This will
probably be in the master page, but does not have to be.
2) Use themes. That way you don't need to include the CSS file yourself,
as the ASP.NET engine will do it for you.
3) There are ways of using properties of the page to set style sheets,
but I don't see the point as they are more complex, and have no benefit
IMO.
> 2 - It doesn't recognize <embed>. I have a Flash stuff at the top.
<embed> has never been valid HTML. It was introduced by either MS or
Netscape during the browsers wars, but was never adopted officially.
The <object> tag should do what you want instead.
>3 - In <td> it says that "height" is obsolete and that I should use a
>newer one. What is the newer one? I tried style="height=35".
Height, along with (almost) all other presentation-based attributes is
obsolete as this sort of stuff should be done with CSS.
The reason your CSS isn't working is that your syntax is wrong. It
should be... style="height:35px" - note that you need units there. Just
using style="height:35" is invalid, and can give unpredictable results.
> However, doesn't whatever is in the "style" have to be in double
>quotes, so how would one enclose the "35"?
See previous.
>4 - It says that "background" is invalid in <td>. Since I point to an
>image file, which appears in the browser by the way, what is the proper
>one to use? Obviously, it must be getting it because when I test it,
>the image appears.
Again, the background attribute is obsolete. The following will set a
background for a <td>...
<td style="background: #fff url(image.gif)">
This will set the background of the cell to white, and use image.gif for
a background image. Again, a good book on standards-based web design
will explain the full details of the CSS needed to style a <td> (amongst
many other things).
>5 - It say that "img" requires the "alt" tag. I currently don't have
>one. What should I use?
Depends what the image is there for. The alt attribute (it's not a tag,
it's an attribute of the <img> tag) is intended to supply alternate text
in case the image is not rendered. Therefore, the alt text should
describe the image.
If your image does not have any semantic meaning (which begs the
question why you are using it), then just set the alt text to an empty
string...
<img src="image.gif" alt="">
> 6 - It also says that bgcolor is outdated. Again, what is the
>replacement?
See above for the background element in CSS.
> Is there somewhere that you can point me to find out what all the
>replacements are and their syntax?
www.w3schools.com is the definitive source for info on CSS and HTML.
There are many good sites and books around that will explain them in
easier terms for a beginner.
>7 - Ditto for "align" in <div>
<div style="align:right">...</div>
However, aligning in divs isn't as easy as it sounds as you have to
understand how divs work. Again, a good book on CSS will help.
FWIW I found Eric Meyer's two "...On CSS" books very good for learning
basic CSS. They show you how to convert a pre-CSS layout to a CSS one,
and are presented in a very clear way.
HTH

Signature
Alan Silver
(anything added below this line is nothing to do with me)