Yellow Highlight?? (Full Version)

All Forums >> [Web Development] >> Expression Web Help



Message


fhenkel -> Yellow Highlight?? (1/21/2007 11:56:12)

I am in the process of learnig about CSS and have used the tutorial here. My question is within EWD and it is related to the line of linking a external CSS page. When I pull up the tutors Sample html page and look at the code it is fine in EWD but when I copy that line to a new page created by my EWD, it highlights the line in yellow as though there is a problem, any ideas. This is the line in question:

<LINK REL=STYLESHEET TYPE="text/css" HREF="site.css">




Tailslide -> RE: Yellow Highlight?? (1/21/2007 12:03:07)

It should be:

<link rel="stylesheet" type="text/css" href="site.css">


Note the quotes around stylesheet




coreybryant -> RE: Yellow Highlight?? (1/21/2007 14:47:36)

Also chances are you might be using XHTML which will want you to use lowercase HTML as Tailslide entered




Tailslide -> RE: Yellow Highlight?? (1/21/2007 14:51:39)

If you are using XHTML then you'll also want to self close the tag like this:
<link rel="stylesheet" type="text/css" href="site.css" />




coreybryant -> RE: Yellow Highlight?? (1/21/2007 14:56:25)

I knew that LOL - sorry about that. I do it and just tend to forget that I do it automatically.




fhenkel -> RE: Yellow Highlight?? (1/21/2007 20:35:12)

Thanks for the feedback. That line is a straight copy from the CSS Tutorial on page 3.. Guess it must be a typo... Wait one.......

Well I just tried using all lower case and put the quotes around the "stylesheet" but the yellow highlight is still on that line?? Here is the current line with the changes:

<link rel="stylesheet" type="text/css" href="site.css">

Below is the line out of the Tutors Sample Page and EWD does not highlight it at all??

<LINK href="CSS%20Sample_files/site.css" type=text/css rel=STYLESHEET>





Tailslide -> RE: Yellow Highlight?? (1/22/2007 2:31:49)

Are you using HTML or XHTML?

If you are using XHTML then you must self close the tag as explained above.




fhenkel -> RE: Yellow Highlight?? (1/22/2007 7:51:35)

I hate to sound this novice but I'm assuming I'm using HTML. At least I've never had to tell FP to create any XHTML before. Now using EWD, do I need to choose HTML or XHTML when having it create a new page?

It may be that your correct as this is the line EWD put at the top of page:
<!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">

Where would a setting be to tell EWD to use HTML and not XHTML?

Trying the /> now ........ Your correct that solve the issue, guess I'm using XHTML?? I checked and the Doc Type Declaration is set to XHTML 1.0 transitional, should I set it to be HTML 4.01 transitional?




jaybee -> RE: Yellow Highlight?? (1/22/2007 8:02:41)

No leave it as it is or you'll have to take the / out again as that doesn't work with 4.




coreybryant -> RE: Yellow Highlight?? (1/22/2007 11:26:48)

To tell Expression Web what version to use, go to Tools - Page Options. Under the General tab, you will see default document type - leave as HTML. In the Document Type Declaration (DTD), choose your DTD. Expression web will close your image tags if you drag / drop and will show the errors if you choose it to.

Frontpage - you had to manually change the template to enter the DTD - otherwise pages would not validate.




fhenkel -> RE: Yellow Highlight?? (1/22/2007 13:15:18)

Ok, got it! I do however have another question on the highlighting of problem areas. I have a music site and am editing one of the old FP Theme pages, I know thats old, but a couple of hundred pages all have an EMBED SRC= in them for the player. I see that when moving the cursor over the "EMBED", it says this is not allowed in XHTML? What would the replacement be for this in order to have the player work? Should I change the DTD to be HTML 4.01?




jaybee -> RE: Yellow Highlight?? (1/22/2007 13:49:52)

Ahhhh yes, There's a thread around somewhere that explains all about it, in Hints and tips I think. You need to get the full object embed code and stick it in a .js file and call it in using a script tag.

As you have so many you may be better off using 4.01

[Edit] the thread is here




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625