timmo76
Members
-
Joined
-
Last visited
Reputation Activity
-
timmo76 reacted to Neji in How to have a bg image and then put many scattered images, each of which being a link to different pagesYou could but the bg image on the body, then create a div which is as wide as you need for your click-able elements. Then place the images in that div probably with absolute. I'm no expert though so there might be a better way.
For your second question, what you're asking for is a WYSIWYG (What you see is what you get) editor, Dreamweaver being the best known one. I wouldn't recommend using them though because the code you get is usually functional but not very good. With a little help from forums like this, you'll get a much better solution most likely.
-
timmo76 reacted to Neji in How to have a bg image and then put many scattered images, each of which being a link to different pagesYou'll probably want a second opinion on this but I seem to recall reading about image maps being pretty slow and possibly more bandwidth intensive (based on image sizes). Thinking about it as well, if you do it as an image map, your background will take longer to load which is probably the biggest reason I'd position with CSS.
-
timmo76 reacted to Bomb in How to have a bg image and then put many scattered images, each of which being a link to different pagesI would do it this way myself.
-
Can you try this doctype
<?xml version="1.0" standalone="yes" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
You may have to alter certain tags in your page to conform to xhtml
Pat
-
timmo76 reacted to MikeChipshop in Help to fix a HTML validation errorChange this...
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
to
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" type="text/javascript">
Basically just adding in...
type="text/javascript"
to the line.
However the 'type' attribute is not needed in HTML5 Doctypes
-
timmo76 reacted to Sazzad in To make simple sitemap for humansYou can take a look at the source code here: http://www.sazzadhossain.org/sitemap/
-
If you are using the img tag it should be defined inline, the image is part of the content and should have semantic value, similar to the alt tag being required.
If an image is being used for layout (e.g. a background) then it should be defined in the CSS and img tag not used.
-
Do it in HTML. It works everywhere, whether users have CSS off/custom/unsupported. It validates & it works.
Also yes, if there's a delay loading the CSS for some reason then it could affect the layout. Just do it in HTML and be done with it
-
timmo76 reacted to Andy Smiff in Can I give visitors option to chose which stylesheet.css my HTML files will connect to?I like jQuery and have tried this before http://www.cssnewbie.com/simple-jquery-stylesheet-switcher/
It works a treat
-
timmo76 reacted to henbast in How to put image on page without losing qualityYou'd use px in that case but you should really just use the width/height attributes.
-
timmo76 reacted to zed in How to put image on page without losing qualityYes, I believe you should specify the height and size but it's not good to resize an image using this. Resize the image off the web and then use that, specifying its dimensions.
-
timmo76 reacted to henbast in How to put image on page without losing qualityYou should specify the width & height in pixels. e.g.
<img src="imagename.jpg" width="500" height="600" alt="Whatever" />
The quality will be the same as the source image.
If you want it smaller, you can change the size values and so long as it's in proportion, it'll look pretty ok, but you'll still be downloading the full size image for no good reason. If you want a thumbnail, resize in Photoshop/Fireworks/whatever and use that instead.
-
timmo76 reacted to henbast in How to put image on page without losing qualityIn the img tag, px is implied and you shouldn't specify it. If you are using CSS you use px to signify pixels (as opposed to points or em's).
-
timmo76 reacted to ElanMan in Help with CSS, to make Skip Navigation link that appears only on focusI use similar css on my blog:
#skip {text-align:right} #skip a, #skip a:hover, #skip a:visited {position:absolute;width:auto;height:auto;right:0;top:-500px;color:#fff} #skip a:focus {position:static}
Basically, the second line sets the default styles on the tag but positions it absolutely (removed from the document flow) and adds a negative top margin so it isn't seen on the page. Only on :focus does the position change to static (the default positioning for all elements). Now the negative top margin doesn't apply; static positioned elements aren't affected by the 'top' value and the tag is seen on the page.
Hope that makes sense
-
timmo76 reacted to Wickham in <html dir="ltr"> and screen readersI don't think you do need the <html dir="ltr"> tag. I don't use it and I've never seen it for a site with normal left to right script. I think it would be a good idea if you have a page with some text left to right and then use the tag only for the right to left text.
I think the error is because the validator thinks that you are changing the direction when in fact you aren't.
However, I've never really considered this before so I may be corrected.
Edit: I found this:-
http://www.w3.org/TR/html401/struct/dirlang.html
-
A short description like that isn't really of much use to a search engine so it may ignore it and use various chunks of from your text copy.
Meta descriptions should ideally be around 150 characters- ish and describe the page, also bear in mind that a search engine won't necessarily use the description, even if it exists, that's why your real copy is much more important..
-
timmo76 reacted to notbanksy in Is something wrong with my meta description tag?If you only recently added the meta tag, then you need to give google a chance to catch up. Your site might not be crawled very regularly, so allow a few weeks for the changes to take effect.
Also, it's a self-closing tag, so the correct xhtml syntax is:
<meta name="description" content="Buy history magazines online" />
-
timmo76 reacted to BlueDreamer in Can I give visitors option to chose which stylesheet.css my HTML files will connect to?Do a web search for "style sheet switcher" and you'll find oodles of them
-
heres a guide just to reiterate what blue said
hope this helped:
http://b461981d.tinylinks.co
Ash
-
That's it, use EM's or % values for font sizes and that will assure text resizing is available over the majority of web browsers.
-
Then create a basic php function to protect ur data like
PHP PROTECT
function protect($string){ //Make conn global global $conn; /* ------------- */ return mysqli_real_escape_string($conn,trim(strip_tags($string))); }
You can also create a function to handle post variables this function will also protect againest undefined index errors
POST FUNCTION
function post_get($post){ if(isset($_POST[$post])){ return $_POST[$post]; } }
-
and next to create a basic insert form just create a plain html form like below
HTML FORM
<form method="POST" action="comment.php"> <p>Name:<input type="text" name="name" size="25" value="<?php echo htmlentities(post_get('name')); ?>" /></p> <p>Comment:<textarea name="comment"><?php echo htmlentities(post_get('name')); ?></textarea></p> <p><button type="text" name="post">Add comment</button></p> </form>
Finally create the script that processes our input
PHP PROCESS
$name = post_get('name'); $comment = post_get('comment'); //Filter the input $name = protect($name); $comment = protect($comment); if(post_get('post')){ $sql_post = "INSERT INTO comments (`name`,`comment`) VALUES('$name','$comment')"; $rel_post = mysqli_query($conn,$sql_post) or die(mysqli_error($conn)); mysqli_close($conn); }
-
And also as mentioned u can display ur comments like this
COMMENT DISPLAY
$sql_display = "SELECT * FROM comments ORDER BY id DESC"; $rel_display = mysqli_query($conn,$sql_display) or die(mysqli_error($sql_display)); //Check if comments exist or not if(mysqli_num_rows($rel_display) < 1){ echo "<p>No comments have been posted</p>"; }else{ while($row = mysqli_fetch_array($rel_display)){ $author = stripslashes($row['name']); $comment = stripslashes($row['comment']); echo "<div id='comments'>Comment Posted By $name<br /><p>$comment</p></div>"; } }
-
To do a mysql connection just do the below
MYSQL CONNECT
<?php $host = "localhost";//Mysql host $user = "root";//Mysql username $pass = "password";//Mysql password leave this variable blank if no password set $db = "comment_db";//Name of database //Start connection $conn = mysqli_connect($host,$user,$pass,$db) or die("Can't connect to mysql"); ?>
-
Yeah you need a database like mysql. The code I wrote was just an example, it wont work exactly like that (little more is necessary).
I can't write the full code for you, so I suggest you read an php / mysql tutorial (the web is stuffed with those).
You wrote:
So go ahead, do it. It`s really not too difficult and you'll learn a lot of usefull stuff.
For the bots again I suggest googling the problem. A captcha may help.