Site Reference Forums

You are not logged in.

#1 2007-11-14 04:37:45

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Validate!!

Ahoy all, does anyone know if there is an alternative (valid) version of the <hr /> tag? I think i may go mad.
Here is why...

using the W3 validator i checked my new site... type in www{dot}lalibela{dot}net... it doesnt validate for some fairly arbitrary reasons... such as an hr tag that apparently cant be used in any variation of its original form, a link that sucks-but im working on that and a missing alt tag (cant do anything about that - its actually a php script that bombs if i try add the <alt="blah">).

I know its pissy to want my page to validate almost perfectly but it would be nice to see it close at least once... especially considering the amount of time i have put into this bladdy thing and the fact that im trying to prove how vast an improvement my site is compared to old .co.za site made by "a company"...

Soooo... any ideas on the <hr /> problem? big_smile curious

Last edited by Ryan_steyn (2007-11-14 04:40:00)


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 

#2 2007-11-14 04:45:23

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3322
I've been thanked 29 times.

Thank me Website
Buy me a beer

Re: Validate!!

I mean this with all politeness


GET A LIFE

LOL cool

Offline

 

#3 2007-11-14 04:52:57

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Re: Validate!!

lol nice, like i never saw that one coming tongue
Cant blame a guy for trying...

Last edited by Ryan_steyn (2007-11-14 04:53:29)


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 

#4 2007-11-14 05:03:19

nybc
Member
Registered: 2006-12-15
Posts: 162
I've been thanked 6 times.

Thank me Website

Re: Validate!!

Hereīs my suggestion. Itīs not valid because you use the <hr />-tag(block-element) inside the <b>-tag (inline-element). This is not allowed?!

Last edited by nybc (2007-11-14 05:12:39)

Offline

 

#5 2007-11-14 05:11:36

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Re: Validate!!

bladdy amazing, who woulda thought such a daft thing as that would bugger up a nice and valid site big_smile Shot Nybc... problem solved storstark


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 

#6 2007-11-14 05:49:56

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3322
I've been thanked 29 times.

Thank me Website
Buy me a beer

Re: Validate!!

glad that is sorted - now - go fishing or something for the afternoon blinka

Offline

 

#7 2007-11-14 06:46:22

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Re: Validate!!

WHAT!? after all that work im thinking about a full blown vacation... mexico maybe big_smile or china.... wherever i can buy shoes cheaper lol


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 

#8 2007-11-14 07:52:49

TheGypsy
Member
From: Where U least expect me
Registered: 2006-07-12
Posts: 2416
I've been thanked 75 times.

Thank me Website
Buy me a beer

Re: Validate!!

Validation -------------------------------------------------------------------- http://www.clicksmilies.com/s1106/waffen/violent-smiley-043.gif

Last edited by TheGypsy (2007-11-14 07:53:06)

Offline

 

#9 2007-11-14 08:01:28

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Re: Validate!!

hey... i figure one day... somewhere... someone is gonna make a valid site that has both pictures and a layout. I figure screw em, it may as well be me big_smile

Last edited by Ryan_steyn (2007-11-14 08:12:48)


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 

#10 2007-11-14 08:07:16

TheGypsy
Member
From: Where U least expect me
Registered: 2006-07-12
Posts: 2416
I've been thanked 75 times.

Thank me Website
Buy me a beer

Re: Validate!!

matte wrote:

I mean this with all politeness


GET A LIFE

LOL cool

Offline

 

#11 2007-11-14 08:30:48

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Re: Validate!!

Nice, personally i am more of " do it yourself" kinda guy when it comes to layout etc, regardless though it definitely one of the better template style sites.


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 

#12 2007-11-14 08:35:03

nybc
Member
Registered: 2006-12-15
Posts: 162
I've been thanked 6 times.

Thank me Website

Re: Validate!!

reta

Offline

 

#13 2007-11-14 09:39:26

Steven_A_S
Member
From: San Antonio, TX
Registered: 2006-08-07
Posts: 458
I've been thanked 21 times.

Thank me Website

Re: Validate!!

Don't know of any reason a php script would bomb if you use a alt="alt tag" attribute properly.  I do it all the time setting up alt tags dynamically.  Show me an example of how you're trying to use it, and I'll see what you're doing wrong.  Hint it shouldn't be used like '<alt="blah">'.

Offline

 

#14 2007-11-15 00:21:03

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Re: Validate!!

Code: php

<?php

/**
 * Change the name of the image folder
 *
 * Images must be named Monday.gif, Tuesday.gif etc
 */


// Change to the location of the folder containing the images
$image_folder = "images/lodges/headers";

$today = date('l');

if (file_exists($image_folder."/".$today.".jpg")) {
  echo "<img src=\"$image_folder/".$today.".jpg\" />";
}
else {
  echo "No image was found for $today";
}

?>


  echo "<img src=\"$image_folder/".$today.".jpg\" />"; is the bit i need to change... i put the red bit in there to close the printed tag but i can tseem to get any variation of the alt= to work in there. If you can get it working... well, that would be awesome big_smile


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 

#15 2007-11-15 09:25:10

griffinsbridge
Member
From: York, England
Registered: 2005-11-04
Posts: 595
I've been thanked 11 times.

Thank me Website

Re: Validate!!

Did you copy that code directly from a file?
Shouldn't it be:

Code: php


<?php



/**

 * Change the name of the image folder

 *

 * Images must be named Monday.gif, Tuesday.gif etc

 */




// Change to the location of the folder containing the images

$image_folder = "images/lodges/headers";



$today = date('l');



if (file_exists($image_folder."/".$today.".jpg")) {

  echo "<img src=\"".$image_folder."/".$today.".jpg\" />";

}

else {

  echo "No image was found for $today";

}



?>
 


I bet you weren't escaping your double quotes when adding the alt:

Code: php

  echo "<img src=\"".$image_folder."/".$today.".jpg\" alt=\"BLAH\"/>";

So many pages, so little time.

Offline

 

#16 2007-11-15 09:32:55

Steven_A_S
Member
From: San Antonio, TX
Registered: 2006-08-07
Posts: 458
I've been thanked 21 times.

Thank me Website

Re: Validate!!

Should be as easy as this:

Code: php

<?php

/**
 * Change the name of the image folder
 *
 * Images must be named Monday.gif, Tuesday.gif etc
 */


// Change to the location of the folder containing the images
$image_folder = "images/lodges/headers";

$today = date('l');

if (file_exists($image_folder."/".$today.".jpg")) {
  echo "<img src=\"{$image_folder}/{$today}.jpg\" alt=\"{$today}&rsquo;s image\" />\n";
}
else {
  echo "No image was found for {$today}\n";
}

?>

Using the braces( {} ) separates the variable from any characters near it so it can be interpreted correctly inline.  I used the character entity for the right single quote to avoid any confusion.  I also like to put the newline character (\n) at the end to make the html look better.

Offline

 

#17 2007-11-16 00:06:13

Ryan_steyn
Member
From: South Africa, Port Elizabeth
Registered: 2006-08-23
Posts: 1722
I've been thanked 28 times.

Thank me 
Buy me a beer

Re: Validate!!

Thanks guys, Griff, you were spot on... i wasnt escaping the quotes, i was however trying to fit it in behind the .jpg in the hopes that it would simply follow from there.

Shot for bringing it up Steven, i probably wouldnt have bothered with it if you hadnt have made a mention. Much appreciated.

(writing this example on my wall - now that ive seen it i realise that i did read about that exact thing in a tutorial a few months back)


"Humans are by far the most fascinating creatures, in a universe with no boundaries and a world with so much unfound wonder we are the only entities capable of creating boredom"

Offline

 
Never
Sponsored Results


Board footer

Powered by PunBB
© Copyright 2002–2008 Rickard Andersson