Jump to content

krow

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by krow

  1. I'm trying to write a function that converts plain text into paragraphs wrapped around <p> tags. Here's an input/output example: Input: $text = <<< OUTParagraph 1 Paragraph 2 Paragraph 3OUT; Output:$text = <<< OUT<p>Paragraph 1</p><p>Paragraph 2</p><p>Paragraph 3</p>OUT; Can anyone give me a hand? Thanks a lot.
  2. Can you provide an example based on my code? I tried doing what you suggested but I didn't get it to work.
  3. Hello, I'm kind of stuck here. I managed to resize my image with a fixed div max-width of 960px and it actually works nicely as long as you resize it both vertically and horizontally. It also works when you resize the image horizontally keeping the height constant but it doesn't work the other way around. When I resize it vertically then the image gets cut off. I need the image to resize regardless of whether I'm changing the width or the height. I hope it's clear! I'm leaving the code below for more info. Thanks for the help! <!DOCTYPE html><html><head><title>Title of the document</title><style>img {max-width: 100%;height: auto;position:relative;z-index:1000;}#container{max-width:500px}</style></head> <body> <div id="container"><img src="http://4.bp.blogspot.com/-5ZidK4NGC68/TzNOGRrdt8I/AAAAAAAADfU/r7_MCTq0WUA/s1600/Vltava+River,+Prague,+Czech+Republic.jpg" /></div></body> </html>
  4. I've been reading different articles about the way to organize files and folders for websites. Unfortunately I don't seem to fully understand if there's something like the correct or the standard way to do it? All opinions are pretty much in the same path but I've seen they really depend on the complexity of the website, i.e. how large the contents are. Based on what I've read here's how I'm organizing my files root img js articles topic1 article1 img index.html ... ... article2 article3 ... ... topic2 topic3 ... ... img resources classes libraries templates ...index.phpcontactus.phperror1.phperror2.php...... I'd like to know if I'm in the right direction?
  5. Hello Is there any way to make my form set its width automatically based on the width of my fields? The problem I have is this, when I set the width of my form (e.g. 350px) and reduce the screen resolution to the minimum (Ctrl + mouse wheel) then the fields inside the form get totally messed up, i.e. the form frame becomes even smaller than the actual text areas. I wonder if there's any way I can achieve this so that regardless of the screen resolution they still preserve the same layout? thanks a lot. ps sorry about the formatting of my html code, aren't the tags supposed to indent it?. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /><title>Contact Form</title><link href="css/styles.css" rel="stylesheet" type="text/css" /> <style type="text/css">form{border:#333333 1px dotted;padding:10px;background:#EAEAEA;border-radius:7px;margin:15px;}form td{padding:1px;}th{background:#B1D8FF;padding:5px;}textarea{resize:none;}h1{font-family:"Times New Roman", Times, serif;text-align:left;font-size:20px;}label{color:#292929;}#below-title-text{font-style:italic;font-size:16px;text-align:left;padding:10px 0;}#submit-button{width:130px;height:40px;background:#B1D8FF;border-radius:5px;}</style> </head> <body><p>Any questions, doubts or suggestions?</p><form action="donate.php" method="post" name="donation form"><table><th colspan="2"><h1 >Contact Us!</h1></th><tr><td width="74"><label for ="name">Name</label></td><td width="180"><input type="text" name="name" maxlength="50" size="30"/></td></tr><tr><td><label for ="password">Email</label></td><td><input type="text" name="email" maxlength="50" size="30"/></td></tr><tr><td><label for="donation">Subject</label></td><td><input type="text" name="subject" maxlength="50" size="30"/></td></tr><tr><td colspan="2"><label for="comments">Comments</label></td></tr><tr><td colspan="2"><textarea id="ta1" name="comments" rows=10 cols=40 onKeyDown="textCounter('ta1','ta1count',300);" onKeyUp="textCounter('ta1','ta1count',300);"></textarea></td></tr><tr><td></td><td ><input name="submit" type="submit" id="submit-button" value="Submit" /></td></tr></table></form></body></html>
  6. Well actually, it was better to set overflow to hidden because when I set it to auto then I have unnecessary scroll bars in my page. Set to hidden is perfect
  7. I love forums! thanks Ingolme. That solved my problem.
  8. Hello, I'm having difficulties trying to understand how the wrapper works, or I think the problem may also be caused by the float and/or clear attributes? In my example I have a wrapper which holds two boxes, when I type code in the boxes they expand automatically downwards but my wrapper remains static, it won't expand as I type in to the two boxes. Does it mean I have to explicitly set a height to the wrapper or is it something to do with the float and/or clear attributes? I set different colors to the two boxes and the wrapper just to see if the wrapper actually expands but it won't move. Thanks for your help. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /><title>Here goes a title</title> <style type="text/css"> body, h1, html{margin:0;padding:0;}#wrapper{width:900px;background:#E9E9E9;margin:0 auto;background:#FFFF33;}#left-content-area{width:600px;float:left;background:#0066FF;}#right-content-area{width:300px;float:right;background:#CCCCCC;} </style> </head> <body> <div id="wrapper"> <div id="left-content-area"><h1>some text goes here</h1><p>some text goes heresome text goes hersome text goes hersome text goes hersome text goes hersome text goes hersome text goes her</p></div> <div id="right-content-area"><h1>some text goes here</h1><p>some text goes heresome text goes hersome text goes hersome ttext goes heresome text goes hersome text goes hersome tetext goes heresome text goes hersome text goes hersome teext goes hersome text goes hersome text goes hersome text goes her</p></div> </div><!-- end of wrapper --> </body></html>
  9. Good to know! It's just that I don't know what to look at or what to improve in my codes. I've been working on my portfolio lately so that if I get a job offer or something then I'm able to show "something", then they'll know what to expect from me. It's just hard not have friends or someone who can give you tips, suggestions or constructive criticism, even though I know there's plenty of information on the internet about this topic. That's why I decided to turn to forums and clarify the doubts I had. Thanks.
  10. I've been looking at different page sources on the net and I've noticed there are variations in the way the code is usually indented. I would like to know if there are standards to follow as to what's the right indenting technique/style to use or if this is more of a preference? For example, in some pages, especially parts containing images and links inside ul and li tags, sometimes I see the code horribly piled up which makes it really hard to read. How can someone, even experienced web developers actually read that? I've gotten used to always hand writing my html and it seems to me it looks sometimes kind of empty as I always try to separate things so that they are easy to read. But then when I randomly choose websites and view the code, often times the codes I see are much more condensed, some of them left-justified, some of them piled up, etc. I don't have work experience in web development but I do like to develop websites, I'm simply trying to adopt good coding practices. I guess companies take that into consideration when hiring a developer ??? Any comments, suggestions or recommendations on good articles to read will be much appreciated.
  11. Great Ingolme, thanks! just what I needed. I guess the problem is that I didn't know how to use the overflow property.
  12. Hello, The code below is quite simple but there are things I still don't fully understand. 1. When I place code inside the center container the wrapper expands automatically, but it won't happen when I do the same in the left or right container. Why's that? do I need to explicitly set the height of the wrapper? 2. When I reduce the resolution to the minimum I see that the link in the center container falls on a second line. Is there any way to avoid that? Thanks. [/font][/color][color=#000000][size=3]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/size][/color][/font][/color]<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title> <style type="text/css"> p, h1, h2{text-align:center;} #wrapper{width:900px;margin:0 auto;} #left{width:200px;float:left;} #right{width:200px;float:right;} #center{width:500px;margin:0 auto;background-color:#CCC;}</style> </head> <body> <div id="wrapper"> <div id="left"> <h2>Left column</h2> <p>Some text some text</p> </div> <div id="right"> <h2>Right column</h2> <p>Some text some text</p> </div> <div id="center"> <h1>Center column</h1> <p>Some text some text some textSome text some text some textSome textSome textSome textSome textSome textSome textSome textSome</p> <p><a href="http://www.google.com">Click hereClick hereClick hereClick hereClick hereClick hereClick hereClick</a></p> </div> </div></body>[color=#000000][size=3]</html>[/size][/color][color=#000000][font=verdana, geneva, lucida,]
  13. krow

    Full height of a page

    Yes Smiles, thanks. Now based on your example I have to check what's wrong with my code and change it ;-)
  14. krow

    Full height of a page

    Hello, I'm having a problem with the page I'm designing. On the bottom of my page, after the footer I want only about 15px of spacing, I don't know how to set the full height of my page. I tried setting the size of the wrapper but I still have some room on the bottom which I don't want. When I open the browsers I see around 150px with nothing in it. I also tried setting the height in html, body{} but no success. What am I doing wrong? thank you.
×
×
  • Create New...