So close to W3C...help! (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


fade2black -> So close to W3C...help! (3/1/2005 14:56:33)

Hi, I have managed to get my website down to just 4 errors as per below. W3C suggests to put these into my CSS. I don't know the format they need to go in as. Can anybody help?

Thanks...Fade


<body topmargin="6" leftmargin="0" background="images/gifs/sol-bg.gif">



Line 12, column 31: there is no attribute "LEFTMARGIN"

<body topmargin="6" leftmargin="0" background="images/gifs/sol-bg.gif">



Line 15, column 27: there is no attribute "HEIGHT"
<table width="80%" height="100%" id="table1" bgcolor="#C5D3D3" cellspacing="1"



Line 21, column 69: there is no attribute "BACKGROUND"

..." id="table2" height="36" background="images/jpgs/menu.jpg" cellspacing="0" c




Nicole -> RE: So close to W3C...help! (3/1/2005 16:44:49)

Hi Fade

I'm learning CSS as i go also, and am no expert but here's my suggestion:

In your CSS

body {
margin-top: 6;
margin-left: 0;
background-image: images/gifs/sol-bg.gif;
}

Just delete the "height" from the code, unless you really want a height.

table#table2 {
background-image: images/gifs/sol-bg.gif
}

Try that?

Nicole




d a v e -> RE: So close to W3C...help! (3/2/2005 0:28:11)

don't forget those units... in this case pixels
 body {
margin-top: 6px;
margin-left: 0;
background-image: images/gifs/sol-bg.gif;
} 





fade2black -> RE: So close to W3C...help! (3/2/2005 6:36:12)

Hi guy's

Thanks for your help. The first part worked. It's down to 2 errors on one line.

Line 21, column 53: there is no attribute "HEIGHT"
Line 21, column 69: there is no attribute "BACKGROUND"

My html:
<table border="0" width="94%" id="table2" background="images/jpgs/menu.jpg" cellspacing="0" cellpadding="0">

I removed the above line completely and added the code below to the CSS.
The background image is not showing.

table#table2 {
background-image: images/gifs/sol-bg.gif
}


Thanks....Fade




d a v e -> RE: So close to W3C...help! (3/2/2005 7:40:02)

try
table#table2 { 
background-image: url(images/gifs/sol-bg.gif);
} 




fade2black -> RE: So close to W3C...help! (3/2/2005 11:02:08)

Hi Dave, thanks for that.

The table2 background image "images/jpgs/menu.jpg" (wrong image given in prev post) is still not showing. The image is definitely there when the line is removed from the CSS. I tried without brackets etc. No joy.

This is what I have at the top of my CSS:

body {
margin-top: 6px;
margin-left: 0;
background-image: images/gifs/sol-bg.gif;
}

table#table2 {
background-image: url(images/jpgs/menu.jpg);
}

This is the line of the html page concerned which I also tried with it removed.

<table id="table2" border="0" width="94%" cellspacing="0" cellpadding="0">

....Fade




d a v e -> RE: So close to W3C...help! (3/2/2005 11:15:38)

oh yeah
table#table2 {
background-image: url(images/jpgs/menu.jpg);
}

should be
#table2 {
background-image: url(images/jpgs/menu.jpg);
}




fade2black -> RE: So close to W3C...help! (3/2/2005 12:09:51)

Hi Dave

Tried that, but still no go. Tried taking out the CSS from the page and reintroducing it.

Thanks....Fade




d a v e -> RE: So close to W3C...help! (3/2/2005 13:34:38)

have you got a url we could look at? it's often the easiest way... :)




fade2black -> RE: So close to W3C...help! (3/3/2005 9:46:06)

The web site is just about finished, but please do have a look.
I am back to 4 errors now!
www.solingles.com

Thanks....Fade




jaybee -> RE: So close to W3C...help! (3/3/2005 10:09:58)

Well I can see the background to the menu. It's a green gradient in a lozenge.




fade2black -> RE: So close to W3C...help! (3/3/2005 10:35:23)

Yeah, that's because the site is as it was before trying to get rid of the 4 errors. The suggested inclusions have been removed from the CSS.




c1sissy -> RE: So close to W3C...help! (3/4/2005 8:53:27)

Hi, one thing I noticed in your css is that you have to change this
a:link, a:active, a:visited {
font-family: Verdana;
font-size: 10pt;
font-weight: bold;
color: #35465D;
text-decoration: none;
}

to this
a:link,[color=#660033] a:visited, a:active[/color]{
font-family: Verdana;
font-size: 10pt;
font-weight: bold;
color: #35465D;
text-decoration: none;
}

Remember when doing your links it should be LVHA (Link Visited Hover Active.

On the following below, try a padding left on this.
p.v8L_blu {
font-family: Verdana;
font-size: 8pt;
font-weight: normal;
color: #35465D;
text-align: left;
}

The reason why the fist box where it says website services, most likely doesn't go out of the div is because its a list, which automatically puts in a padding.

Also, what I would do if I were you is to create a different class for the other two divs that are in there where the text is coming out of the div. This way, you can add a slight padding and it won't interfer with the website services section.

Not sure if this will help you out or not, but try it just to see if it works




anderskorte -> RE: So close to W3C...help! (3/9/2005 3:06:57)

quote:

ORIGINAL: c1sissy

Remember when doing your links it should be LVHA (Link Visited Hover Active.

LVHAF. Link Visited Hover Active Focus.




c1sissy -> RE: So close to W3C...help! (3/9/2005 7:34:40)

anderskorte
lol, you are so right about the focus, I always forget about that one. I believe that is only for forms though? So in a normal navigation that one isn't a required usage.




d a v e -> RE: So close to W3C...help! (3/9/2005 8:58:19)

on frontpage talk forum the one of the moderators gave it as
Link, Visited, Hover, Focus, Active
though from what the w3c say it's not clear whether it's necessary to put focus or active before the other maybe it doesn't matter as the active link is in focus anyway!


Deb don't forget it shows up when you TAB through the links (if you surf that way)
e.g. here http://members.tiscali.fi/dave_pirjo/test-area/css_stuff/hifi/hifi.html

ah just tried it out and Active should be last or it is outweighed by focus
(in my example tabbed links are yellow on black, the active link - when you click - is yellow on red)




c1sissy -> RE: So close to W3C...help! (3/9/2005 9:59:06)

quote:

Deb don't forget it shows up when you TAB through the links (if you surf that way)


How do you "tab" through links? I mean, can you actually click a link this way? Curious.




Giomanach -> RE: So close to W3C...help! (3/9/2005 10:48:53)

quote:

How do you "tab" through links? I mean, can you actually click a link this way? Curious.

Go to any webpage, and hit tab till the link you want is highlighted, then hit return/enter in the keyboard [;)]




caz -> RE: So close to W3C...help! (3/9/2005 11:28:42)

Can I just applaud your helpfully commented CSS - it's a lesson to us all for when we come back to a stylesheet and scratch the head wondering why we did that there. [&:]

Cheers
Carol




dpf -> RE: So close to W3C...help! (3/9/2005 11:38:33)

speaking of commenting code, THIS was posted here the other day. textbook example of beautiful commenting - worth a look!
<edit> and talk about accessibility - look at this alt tag for the first link in the nav:
quote:

alt="Attention users of screen reader software. There are 2 possible starting points on the NARA Home Page, please select where you want to start using this page from the following choices:">




d a v e -> RE: So close to W3C...help! (3/9/2005 11:53:31)

surely alt in this case should be alt="" and the title attribute used for the description of the link?! to be picky though i would be okwith the way they've done it. i s'pose




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
9.277344E-02