Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

timmo76

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    You 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.
  2. Like
    You'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.
  3. Like
  4. Like
    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

     
     
  5. Like
    timmo76 reacted to MikeChipshop in Help to fix a HTML validation error   
    Change 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
  6. Like
    timmo76 reacted to Sazzad in To make simple sitemap for humans   
    You can take a look at the source code here: http://www.sazzadhossain.org/sitemap/
  7. Like
    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.
  8. Like
    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
  9. Like
    I like jQuery and have tried this before http://www.cssnewbie.com/simple-jquery-stylesheet-switcher/
     
    It works a treat
  10. Like
    timmo76 reacted to henbast in How to put image on page without losing quality   
    You'd use px in that case but you should really just use the width/height attributes.
  11. Like
    timmo76 reacted to zed in How to put image on page without losing quality   
    Yes, 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.
  12. Like
    timmo76 reacted to henbast in How to put image on page without losing quality   
    You 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.
  13. Like
    timmo76 reacted to henbast in How to put image on page without losing quality   
    In 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).
  14. Like
    I 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
  15. Like
    timmo76 reacted to Wickham in <html dir="ltr"> and screen readers   
    I 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
  16. Like
    timmo76 reacted to BlueDreamer in Is something wrong with my meta description tag?   
    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..
  17. Like
    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" />
  18. Like
    Do a web search for "style sheet switcher" and you'll find oodles of them
  19. Like
    heres a guide just to reiterate what blue said
     
    hope this helped:
     
    http://b461981d.tinylinks.co
     
    Ash
  20. Like
    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.
  21. Like
    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]; } }
  22. Like
    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); }
  23. Like
    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>"; } }
  24. Like
    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"); ?>
  25. Like
    timmo76 reacted to microBlonk in Simple way to post comment anonymously on my site   
    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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.