Validation help, please

please see

https://jigsaw.w3.org/css-validator/validator?uri=forallthetime.com%2Fnature2%2Fstyle.css&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=en

dont understand this at all :frowning:

please pass on the correct code and provide me with what was my problem

https://validator.w3.org/nu/?doc=https%3A%2F%2Fforallthetime.com%2Fnature2%2Findex.html

not much here, kindly explain

i am aware there is a space in my image src

and

https://forallthetime.com/nature2/index.html

here i am missing some, but not all, imagesā€¦ no clue why

its fine in my text editor, before FTP

sorry if its obvious and i missed something silly

again, please pass on the proper code and coment how you fixed my issueā€¦ i want to learn :slight_smile:

MANY THANKS

In the first case, youā€™ve got your @media blocks inside-out with your CSS. The CSS styles go inside the @media section, not the other way around. So re-organize the lower half of your CSS like this:

(stuff above here remains the same)
/* grid styles ------------------------------------ */
.main {
  display: grid;
}

@media (min-width: 600px) {
	.main {
	     grid-template-columns: repeat(6, 1fr);
	}
	
	.info--1 {
	    grid-column: span 2;
	    grid-row: span 2;
	}
	
	.info--2 {
	    grid-column: span 2;
	}
	
	.figure1 {
	    grid-column: span 3;
	    grid-row: span 2;
	}
	
	.figure6 {
	    grid-column: span 2;
	}
	
	.figure7 {
	    grid-column: span 3;
	}
}

Regarding the question about images, I canā€™t tell what the actual image file names look like on the server, but Iā€™ll bet thereā€™s a disconnect somewhere with the name in the link, with all the various upper and lower case letters, and the actual spelling of those file names on the server. List out the file names on the server and compare very closely to make sure there isnā€™t a typo (suggestion: use all the same case, donā€™t use spaces or other weird letters, or youā€™ll continue to have this problem in the future).

Error: Stray end tag a.

From line 21, column 7; to line 21, column 10

What it says on the tin. Youā€™ve got a </a>after your headerā€™s h1 tag (line 21) that doesnā€™t match anything.

All but one of these 404ā€™d. Did you upload the pictures to the server? Do the filenames actually have underscores, or is that your web editor trying to be clever with open and close parentheses?

i used ftp filezilla to forallthetime.com/nature3/index.html

i dragged and dropped my image folder and index.html and style.css fom local (left) to remote(right)

i also renamed the images in their folder to simple .jpgs

eg 1, 2, 3 etc and a, b, c etc

my former jpgs were long, underscoresā€¦ a mess

it looks perfect in VS Codeā€¦

could this be a hosting issue for godaddy? (which i use)

i appreciate your time and trouble :slight_smile:

thank you for helping me!

You have the image path as here relative to root:

/IMAGES/1.jpg

e.g. https://forallthetime.com/IMAGES/1.jpg

But it is here relative to the nature folder:

https://forallthetime.com/nature3/IMAGES/1.jpg

i added the code provided above

forallthetime.com/nature3/styles.css

down to 1 error

https://jigsaw.w3.org/css-validator/validator?uri=forallthetime.com%2Fnature3%2Fstyle.css&profile=css3svg&usermedium=all&warning=1&vextwarning=&lang=en

not sure where my problem is except for my media queries

Warning (1) main is a CSS hack

help me, please :slight_smile:

the HTML validator is fine

Thatā€™s a mystery to me. If I copy your css directly, either into a file to validate or pasting it directly into the validator, it validates fine with no errors or warnings. So Iā€™m not sure what the issue is. Maybe cut/paste it a second file, just to see if thereā€™s something funky in that file thatā€™s causing a problem with the validator?

Maybe someone else can spot the issueā€¦

Thanks, Paul

BINGO!! it works!

MANY THANKS!

interestingā€¦ /IMAGES/#.jpg worked fine on other projectsā€¦

not sure what you did for meā€¦

breifly expain :slight_smile:

Starting a relative URL (Relative meaning its not "http://ā€¦ etc etc, but relative to the current page) with a / translates as ā€œgo to rootā€.

Your page is at http://forallthetime.com/nature3/index.html.
the root of that is http://forallthetime.com/.

So ā€œ/IMAGESā€ means http://forallthetime.com/IMAGES, NOT http://forallthetime.com/nature3/IMAGES.

Removing the leading slash makes it relative to the current directory, so ā€œIMAGES/#.jpgā€ becomes http://forallthetime.com/nature3/IMAGES/#.jpg.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.