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.

Frisby

Members
  • Joined

  • Last visited

Everything posted by Frisby

  1. That's exceedingly handy. Thanks! Hm, however, on further investigation, the layout is not glitched on the ipad peek, whilst it was, last time I checked, in real life...
  2. Thanks. Unfortunately I rarely have an iPad handy, so its hard for me to test it...
  3. I don't think the screen resolution is a problem. The layout fits fine and isn't stretched or squished out of its normal dimension. Iframe and PHP include debate aside, does anyone have any knowledge of this problem occurring before? Or have any knowledge of the differences between iPad safari and regular safari? Anything potentially helpful?
  4. Because using PHP includes would require changing all the pages from .html to .php, which would totally mess up all the tech-unsavvy people that update the site...I've already looked into other options, and this is the best thing that fits their needs. I just can't switch from iframes, regardless of how deplorable they may be.
  5. I'm self taught. Classes are helpful though. I had a tough time with Adobe Illustrator until I took a class that included that. I think for the most part, you can get along quite well without lessons, but you might encounter a few things you need more help learning, and that's where they'd come in useful. If you want to learn graphic design on your own, perhaps read up on some articles online and just keep an eye out on the world around you. Examine what works and what doesn't, and try to figure out why. The best way to improve is to probably try your hand at it. The more you practice, the better you'll get.
  6. Hello! I made a layout, and it looks fine on all the regular browsers, but I discovered that it's got a little glitch on the iPad. I don't have any experience with iPad compatibility, so if any of you do, that'd be quite helpful. You can see the layout here: http://ipswichschools.org/ Basically, on the iPad, the lower half of the middle nav is missing. It is an iframe, and changing that fact is not really an option. All help is appreciated! Thanks. ^^
  7. The best designers drink nothing at all. Not even water.
  8. Awesome, thanks!
  9. I recoded part of this website: http://ipswichschools.org with iframes, and it apparently doesn't work in IE7. The oldest version of IE I can get is IE8, so I can't see what's going wrong. The new version of the site uses iframes and I think that's the problem. Does anyone here have experience with iframes and IE7? All help is appreciated! This website has a good bit of traffic, so I need to fix it as soon as possible.
  10. Ah, cool. I didn't know that could be done. Thanks!
  11. I recoded my school's website, and part of what I did was putting the sidebar links in iframes, so the people who update the site only have to change one file to update all the sidebars. The problem is that when people view a page with a newly edited iframe embedded in it, it does not update, at least right away. I've had to right click on the iframe, open it in a new tab, and refresh that separately to get the sidebar to update. As the website is going to be used by a bunch of un-tech-savvy laymen, I really the iframes to update right away. Is there anything that can be done? I originally wanted to use php includes, but all the files have to remain .html. ALSO. I switched out the old files with the new, but I think a lot of people have old versions of the site cache, so when they go from the homepage they're having trouble with broken links. I would rather not tell the hundreds of people who use the site to empty their cache. What can I do? Thanks.
  12. Thanks, this should help a lot. (:
  13. This program is supposed to take large pngs and resize them so their widths and heights are no larger than 700px. I wrote the same program for jpegs, and a similar one for pngs, but for some reason this particular program doesn't want to work. When I put in a large png (width and height are both over 700px), it'll output "The width is 3072 and the height is 2048," something like that, but it doesn't create or display the smaller image it's supposed to make. <?php $filename = '1.png'; $sizearray = getimagesize($filename); $width = $sizearray[0]; $height = $sizearray[1]; echo "The width is $width and the height is $height. "; if ($width > $height && $width > 700) { $new_height = ($height * 700)/$width; $new_width = 700; } elseif ($width < $height && $height > 700) { $new_width = ($width * 700)/$height; $new_height = 700; } elseif ($width == $height && $width > 700) { $new_height = 700; $new_width = 700; } else{ echo "No resizing needed"; } $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefrompng($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); imagepng($image_p, "s4.png", 3); echo "<img src='s4.png'>"; ?>
  14. I've got it working. Thanks!
  15. I have a pattern, a string I'd like to search through, and I want the matching section of the string to be stored in a variable. Pattern: [0-9]*(?=\.gif$) String: http://figmint.zzl.org/photos/3.gif I tested this in a regex tester and it highlighted the "3", which is what I want. I've never done this before though, so I don't know what function I should be using for this, or how to go about it. Also, I was trying to test this on my own with an if/else, and it always outputs "no match" for some reason: <?php if (preg_match("[0-9]*(?=\.gif$)", "http://figmint.zzl.org/photos/3.gif")) { echo "it matched"; } else { echo "no match"; } ?>
  16. I found a weird solution. It's kind of messy, but I used negative margins again with the .imagnavs, and set the iframe's background color to orange so you can't tell it's exploding out the right side. To change the background color to orange, I had to add this to the iframe file. <body style="background:#B85D01;"> ... </body>
  17. Not entirely sure what that is, but I tried doing it and I don't think it had an effect.
  18. I have coded a layout for a school homepage. You can see the code below and a screenshot of it. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <title>Ipswich Public Schools</title> <link rel="stylesheet" type="text/css" href="./district/css/district_1.css"> </HEAD> <BODY> <div id="container"> <div id="top"> <a href="http://ipswichschools.org/doyon/" class="imgnav" style="background-image:url('./district/images/doyon.jpg');border-right:9px solid #B85D01;"> </a> <div class="space"> </div> <a href="http://ipswichschools.org/winthrop/" class="imgnav" style="background-image:url('./district/images/winthrop.jpg');border-right:9px solid #B85D01;"> </a> <div class="space"> </div> <a href="http://ipswichschools.org/middleschool/" class="imgnav" style="background-image:url('./district/images/middle.jpg');border-right:9px solid #B85D01;"> </a> <div class="space"> </div> <a href="http://ipswichschools.org/highschool/" class="imgnav" style="background-image:url('./district/images/high.jpg');"> </a> </div> <div id="mid"> <span class="cnav"> <a href="http://ipswichschools.org/district/sch/dis_sch.php"> School Committee </a>| <a href="http://ipswichschools.org/district/sup/dis_sup.php"> Superintendent </a>| <a href="http://ipswichschools.org/district/dir/dis_dir.php"> Directions/Contact Info </a>| <a href="http://ipswichschools.org/district/cal/dis_cal.php"> District calendar/Bus Schedule </a>| <a href="http://ipswichschools.org/district/bud/dis_bud.php"> Budget/Finance/Online Payments</a><br> <a href="http://ipswichschools.org/district/spe/dis_spe.php"> Special Education </a>| <a href="http://ipswichschools.org/district/stu/dis_stu.php"> Student Registration </a>| <a href="http://ipswichschools.org/district/res/dis_res.php"> Community Resources </a>| <a href="http://ipswichschools.org/district/pro/dis_pro.php"> Support Programs </a>| <a href="http://ipswichschools.org/district/cur/dis_cur.php"> Curriculum </a>| <a href="http://ipswichschools.org/district/tec/dis_tec.php"> Technology </a>| <a href="http://ipswichschools.org/district/emp/dis_emp.php"> Employment</a> </span> </div> <div id="left"> <img src="./district/images/dis_main.jpg" alt=" "> </div> <div id="right"> <h1>District Info</h1> <h2>Latest News & Updates</h2> Content </div><div id="clear"> </div></div> </BODY> </HTML> CSS: body{ background-color:#5B534A; font-family:helvetica; font-size:12px; } #container{ background:#B85D01; width:1008px; margin:10px auto; min-height:500px; border:10px solid #B85D01; } iframe{ margin: 0px; padding: 0px; } /*--------TOP SECTION-----------*/ #top{ clear:both; width:100%; background:#B85D01; } .imgnav{ position:relative; width:244px; height:133px; background-position:bottom left; float:left; } .imgnav:hover{ background-position:top; } /*------------ Main Columns --------------*/ #left{ width:650px; } #left img{ max-width:650px; } #right img{ max-width:365px; } #left,#right{ float:left; } #right{ width:336px; background:#eee; margin-left:10px; padding:5px; min-height:200px; } #clear{ clear:both; } /*----------- Middle Links Section -------------*/ #mid{ clear:both; width:997px; padding:5px; text-align:center; background:#5B534A; border-top:10px solid #B85D01; border-bottom:10px solid #B85D01; } .cnav, .cnav a{ font-family:century gothic; background:#A98F73; color:#EBE2BB; font-size:13px; letter-spacing:0px; padding:2px; line-height:25px; font-weight:bold; text-transform:uppercase; text-decoration:none; } .cnav a:hover{ background:#846645; } /*----------------- Fancy Looks -----------------*/ h1{ background:#A98F73; color:#E9E1CC; font-family:times new roman, georgia; letter-spacing:1px; font-weight:normal; font-size:25px; padding:5px; padding-bottom:10px; margin:-5px; } h2{ background:#EBE2BB; color:#000000; font-family:century gothic; font-size:15px; padding:2px; margin:-5px; margin-bottom:5px; } h1,h2{ text-transform:uppercase; text-align:center; } That's how I'd like it to look when I'm finished. Now here's the problem. I need to put the top section (the image links to different schools) in an iframe. When I do this, I get a horrible gap that I can't seem to get rid of. See image and code...(the css is the same) Main Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <title>Ipswich Public Schools</title> <link rel="stylesheet" type="text/css" href="./district/css/district_1.css"> </HEAD> <BODY> <div id="container"> <iframe src="if-topmain.html" style="overflow:hidden;border:none;" scrolling="no" width="1004px" height="133px"> Please try viewing this with a different browser. </iframe> <div id="mid"> <span class="cnav"> <a href="http://ipswichschools.org/district/sch/dis_sch.php"> School Committee </a>| <a href="http://ipswichschools.org/district/sup/dis_sup.php"> Superintendent </a>| <a href="http://ipswichschools.org/district/dir/dis_dir.php"> Directions/Contact Info </a>| <a href="http://ipswichschools.org/district/cal/dis_cal.php"> District calendar/Bus Schedule </a>| <a href="http://ipswichschools.org/district/bud/dis_bud.php"> Budget/Finance/Online Payments</a><br> <a href="http://ipswichschools.org/district/spe/dis_spe.php"> Special Education </a>| <a href="http://ipswichschools.org/district/stu/dis_stu.php"> Student Registration </a>| <a href="http://ipswichschools.org/district/res/dis_res.php"> Community Resources </a>| <a href="http://ipswichschools.org/district/pro/dis_pro.php"> Support Programs </a>| <a href="http://ipswichschools.org/district/cur/dis_cur.php"> Curriculum </a>| <a href="http://ipswichschools.org/district/tec/dis_tec.php"> Technology </a>| <a href="http://ipswichschools.org/district/emp/dis_emp.php"> Employment</a> </span> </div> <div id="left"> <img src="./district/images/dis_main.jpg" alt=" "> </div> <div id="right"> <h1>District Info</h1> <h2>Latest News & Updates</h2> Content </div><div id="clear"> </div></div> </BODY> </HTML> iFrame: <link rel="stylesheet" type="text/css" href="./district/css/district_1.css"> <div id="top"> <a href="http://ipswichschools.org/doyon/" class="imgnav" style="background-image:url('./district/images/doyon.jpg');border-right:9px solid #B85D01;"> </a> <div class="space"> </div> <a href="http://ipswichschools.org/winthrop/" class="imgnav" style="background-image:url('./district/images/winthrop.jpg');border-right:9px solid #B85D01;"> </a> <div class="space"> </div> <a href="http://ipswichschools.org/middleschool/" class="imgnav" style="background-image:url('./district/images/middle.jpg');border-right:9px solid #B85D01;"> </a> <div class="space"> </div> <a href="http://ipswichschools.org/highschool/" class="imgnav" style="background-image:url('./district/images/high.jpg');"> </a> </div> I've tried all sorts of things to get rid of the gap--stuff like negative margins. It gets really weird and complicated when I do that, and I no matter what I've done, I haven't been able to remove the gap on the right side where the scrollbar would be if it weren't hidden. Help? I'd use php includes, but I can't for complicated reasons you don't need to worry about. P:
  19. My database has rows and each one has an incrementing number for the primary key. (Row one has ID 1, Row 2 ID 2, Row 3 has ID 3). When I delete one of the rows in the middle, the ID numbers stay as they are so instead of being 1,2,3,4,5, it's 1,2,4,5 (3 was deleted). This'll mes up my program. Is there a way to make it so the missing numbers are filled in when a new row is added (instead of it being row 6, it'd be row 3), or a way to make it so the IDs shift down so they remain sequential? If doing this is too difficult, I'll probably just rewrite my code instead.
  20. That works, Zoonder, thanks. I don't completely understand it though. When you said "SELECT..as max_id" did that give a name (key) to the value you're select? And that's how you were able to refer to it later?
  21. Arg, I feel like such a pathetic, helpless nerdfolk asking all these questions. Anyhow, onto the quandary. Here's my code. It gives me a blank page. I want to get the information from my query and be able to echo it: it's a number, not a bunch of complex stuff. I think I need to pull it out of the once-cell table it's trapped in before I can echo it or use it as a number in a variable. How can I do that? <?php include("secretpwordsclickmeooohoh.php"); $cxn = mysqli_connect($host,$user,$passwd,$dbname) or die ("Couldn't connect to server."); # This will get the number of albums. $query = "SELECT max(albumID) FROM album"; $num_albums = mysqli_query($cxn,$query) or die ("Get number of albums query failed."); echo $num_albums; ?>
  22. Got a few flakes (approximately 7) on the highway a few days ago, over yonder in america. x3 We usually don't get very much until January, but it's cold enough.
  23. Ah! yes! Thank you so much! There was another typo similar to that in the book. *frowns and grabs pencil to fix* Needs a better editor.
  24. Says, "No database selected." By the way, the connection info is here (misc.php). Doesn't it specify the db here? <?php $user="root"; $host="localhost"; $passwd="root"; $database="PetCatalog"; ?>
  25. I'm copying an example from PHP&MySQL for dummies and I'm pretty sure I typed everything in correctly, but when I try to execute the code I get, "Couldn't execute query." I think it's weird because I know it's connecting correctly (I don't get an error for that), and if I put the mysql query I'm trying to execute it in terminal, it works fine. Anyhow, here's the pertinent code. <?php /* Program: PetCatalog.php * Desc: Displays a list of pet categories from the PetType table. Includes descriptions. Displays radio button for user to check. * */ ?> <html> <head><title>Pet Types</title></head> <body> <style type="text/css"> body{ background:#222222; font-size:12px; color:#444444; font-family:tahoma; } #middle{ width:600px; background:#eeeeee; margin:70 auto; padding:20px; } </style> </head> <body> <div id="middle"> <?php include("misc.php"); $cxn = mysqli_connect($host,$user,$passwd,$dbname) or die ("couldn't connect to server"); /* Select all categories from PetType table */ $query = "SELECT * FROM PetType ORDER BY petType"; $result = mysqli_query($cxn,$query) or die ("Couldn't execute query."); ...

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.