Jump to content

cssfreakie

Staff Alumni
  • Posts

    1,674
  • Joined

  • Last visited

Everything posted by cssfreakie

  1. That's because you gave it a property of absolute. If you read the manual it will say that by assigning an element with the property of absolute it will be taken out of the normal flow. The consequence of that is that the dimensions of the absolute positioned element will not affect anything else. So if you would just assign it with a position of relative you will probably see the impact. Although i must say that there is no reason at all for this design to add a position of relative nor absolute as far as i can tell from the picture. I recommend to have a read on the css boxmodel. A pretty vital concept in css if your designing. http://bayarearcsociety.com/tutorial/css_tutorial14.php Btw that is a link to a pretty good to follow css tutorial. it wont beat a book, but for learning the basics it's good enough.
  2. I can help you adjust this code, but you directly learn a bad practise which is doing things more difficult than needed. For such a basic layout (and in fact most layouts are) you only need the property Float and the property clear. A great tutorial on that can be found here. http://css.maxdesign.com.au/floatutorial/ ones you made some code with float and clear i am happy to help you because doing this with a position of absolute, is absolutely not right.
  3. with a bare minimum of effort you would have been able to apply the ready made code to your htmlfile. the only thing i added was the class of .stretch to the div with the id of #middle, and i added the already working jquery at the bottom. The reason i took this jquery approach is because i now noticed you are using a vertical linear gradient. if i would combine the left and right div that would require a huge image and that is not nice. (but you can do that if you don't want to use javascript) here is the script i used i placed some comments in 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=utf-8" /> <title>Stacy Kaiser</title> <link href="includes/styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container_main"> <div id="background_right"> <div id="background_middle"> <div id="background_left"> <div id="content_left"> <div class="hr"><img src="images/hr.jpg" style="margin-top: 30px; margin-botton: 0px;" /></div> <h1>Biography</h1> <img src="images/bio_headshot.jpg" class="fleft" /> <p>Stacy Kaiser is a successful Southern California based licensed psychotherapist, relationship expert and media personality. With over 50 television appearances in the last year on major networks including CNN, NBC, CBS, MSNBC and FOX, Stacy has built a reputation for bringing a unique mix of thoughtful and provocative insight to a wide range of topics. Stacy tackles the demands of a thriving private practice while meeting the daily challenges as a mother of two school-age children. She is a much sought after public speaker on a wide variety of topics, ranging from office and personal relationship issues to anger management and family politics. In addition to her numerous television appearances, her expertise and unique perspective have been solicited by a diverse group of clients including major corporations, public institutions, government agencies and philanthropic organizations.</p> <p>Stacy possesses a unique ability to identify the essence of issues and problems quickly. Her style is honest and forthright, while also bearing the compassion and sensitivity that are fundamental to her profession.</p> <p>As a psychotherapist on both Celebrity Fit Club and Lifetime's DietTribe, Stacy Kaiser has gained a reputation for helping people face the truth that is holding them back from leading a life filled with a generous balance of responsibility, fun and freedom. After providing counseling to thousands of individuals both in her private practice and the media, Stacy has identified ten critical areas needed to develop the skills necessary to become a successful, happy and fulfilled adult.</p> <img src="images/bio_book.jpg" class="fright" /> <p>In her new book "How to be a Grown UpThe Ten Secret Skills Everyone Needs to Know" published by HarperCollins, Spring 2010, Stacy opens with a provocative quiz that helps the reader gain insight into his or her current level of life mastery. In the following chapters, she breaks down the readers strengths and weaknesses to guide them towards improving in the ten areas so that they can maximize their success and ultimately their life. A passion for improving the lives of the under served within her community led to Stacy's work with Southern California's premier family resource center, Friends of the Family, where she has worked with battered women, teen parents, abused children and families in crisis for the past 15 years. She has also been engaged by organizations including the FBI, Los Angeles Fire Department, Los Angeles Unified School District, Kaiser Permanente and Hughes Aircraft to implement workshops and handle third party mediations.</p> <p>Stacy Kaiser received her B.A. in Psychology from California State University, Northridge and her M.A. in Clinical Psychology from Pepperdine University. She is a licensed Marriage and Family Therapist and has received advanced training in the areas of human and child development, as well as emotional, physical and sexual abuse.</p> </div> <div id="content_middle"> <div id="middle" class="middle"><!-- cssfreakie added a class here --> <img src="images/header.jpg" style="margin-top:30px;" /> <img src="images/headshot.jpg" style="margin-top:30px;" /> <?php include('includes/nav.php'); ?> <p style="font-size:.6em; color:#606A66;">Copyright 2007 © <a href="http://www.stacykaiser.com/">www.stacykaiser.com</a>. All rights reserved.</p> </div> </div> <div id="content_right"></div> </div> </div> </div> </div> <!-- some javascript to stretch the divs --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div.stretch").css("height",$(document).height()); }); </script> </body> </html> p.s. don't forget to mark it solved when it is solved
  4. in case you never worked with Jquery here is a possible example. <div id="wrapper"> <div id="a" class="stretch"></div> <div id="b" class="stretch"></div> </div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div.stretch").css("height",$(document).height()); }); </script> this code just checks the document height and applies it to any element with the class of stretch. with pure css it could like like this <style type="text/css"> #wrapper{ background: url(combined-background-image.png) repeat-y; width: 960px; margin:0 auto; overflow:hidden; } </style> <div id="wrapper"> <div id="a"></div> <div id="b"></div> </div>
  5. You could do this in 2 ways. Wrap both divs in a container div and make a background image that combines the colors used in both divs and make it repeat-y. So no matter what it seems as if they both stretch to the bottom while they don't. And second way would be to use javascript to get the height of the page (so that is not 100%) and set both heights of the divs to that value inline. I recommend to use jquery for that.
  6. Good point mjdamato So in a nutshell, always make sure that the values are as expected.
  7. your welcome, If you quickly (and dirty) want to test if your vulnerable just type in a ' if you get an error your vulnerable.
  8. The idea behind sql injection is that you allow user submitted values without stripping / escaping them from bad things which can end up to shape the query instead of just being a normal value you expect. So in other words: all values you receive from your users should not be trusted and be run through a sanitizing function like: http://php.net/manual/en/mysqli.real-escape-string.php <--- examples given there In case you use prepared statements the user submitted values and the query are separated from each other so in that case a similar function is not needed. So find out which are the user submitted values, and sanitize them. IN other words the variables you use in the above query are they user submitted? if so sanitize them.
  9. there are 3 ways to do this: 1) is to make a small transparent png and use that as background image for the container. Not only is that much more cross browser compatible (until ie6), but it also a tiny bit easier. 2) second use rgba on the container 3)If you want to stick with these opacity properties you need as said 2 containers, which are overlapping each other. In order to make that work you need to play with position relative, position absolute and a the z-index property. I prefer the first since not everybody has great browsers yet
  10. well it depends on your expected audience, and your bandwidth bill really. If they all have south korean internet you can use images that are 10mb. Although i would never use an image bigger than 500kb and quite often that is already a sprite with all the other images of the site in it. If i were you i would install Yslow for firefox and run it to see how slow your page is loading. As far as speed there quite some other things that need to be fix with most websites. A big one is the amount of header requests.
  11. well make sure you fixed that sql injection vulnerability, because otherwise someone could walk off with your database. And i assume you don't want to end up (ryan)weekly in the papers like sony does btw are you using: action="<?php echo $_SERVER['PHP_SELF'];?>" in your forms? right now some forms are vulnerable for cross side scripting. Have a read here how to prevent it: http://seancoates.com/blogs/xss-woes
  12. Sorry the wizards (with mind reading skills) are on a sabbatical, maybe be more precise and give some actual code / symptoms your facing which need to be solved.
  13. Do you have an online example?? or did you meant with the above that it was fixed? -edit: i guess it is, good luck with the innovation!..
  14. try to remove <!-- DATABASE CONNECTION TO GO HERE --> Doctype should be the very first thing And if it's not... it's still polite to response not as a computer by just pasting code. But this is the very first thing that happens someone doesn't have a working doctype. IE will go in to quirksmode. If you by the way have an online example it probably would make more sense in the specific situation
  15. I don't have to look at the code to guess that your missing something which is at the number 1 spot in the sticky of this thread. Your missing a (valid) Doctype. So as stated in the sticky please read that.
  16. try this: #content { width:900px; /* we don't set a height */ overflow:hidden; /* but we do set this */ border:solid 1px #000; background-image:url(../images/img6.jpg); background-repeat:repeat-x; background-color:#FFF; padding: 30px 10px 10px 10px; -moz-border-radius : 10px; -webkit-border-radius : 10px; }
  17. I don't know why you want to do that but this is a way to do it header("refresh: 10; url=http://google.com/");
  18. you either pay no attention at all to what is said above or you just missed something which worked. Which i doubt, because you said you were to test it about a week ago... So to rephrase that, the code below works, apply it in your stylesheet where you define the properties for #scroller. #scroller{ height: 100%; margin-left: auto; /* changed */ margin-right: auto; /* changed */ overflow: visible; position: relative; /* changed */ text-align: left; width: 1000px; /* changed */ z-index: 1; } this works! just like a week ago... P.s. so run through your stylesheet ones you reached the point where #scroller is defined, replace that with the above.
  19. This topic has been moved to CSS Help. Because this is a css question http://www.phpfreaks.com/forums/index.php?topic=335365.0
  20. Well i don't use face book alot. But letting div's sit next to each other would require the float property. (as long as they fit in to the container that is holding them) the css would be: .myfloatingdiv{ float:left; width:200px; height:200px; border:2px solid red; margin:1px; } the html would be: <div class="myfloatingdiv">bla1</div> <div class="myfloatingdiv">bla2</div> <div class="myfloatingdiv">bla3</div> If you want to show the div's above all other things (on a higher level on the z-axis) you require a position absolute or relative or fixed, + a higher z-index. I recommend to just google for the keywords in bold text and after you read a bit about it, play with it and when you need help with actual code you wrote post it in the css forum. Hope this helps!
  21. as far as i can tell, you allow very odd passwords usernames and emailaddresses. Also the script to verify the emailadress is not working correctly since anything is valid. Also i have a strong feeling (which i am happy to email you) that some other form is allowing pretty bad things.
  22. That is certainly not the way for anything other than IE 5 or lower
  23. well that is pretty much the basics of css. you need to assign a class to the link. so for instance you have a class of monkeys. in your style sheet you than put it like this: a.monkeys{ /* some effect*/ } in html you do <a class="monkeys" href="lalala.html" /> so now all links with the class of monkeys get that style
  24. you need to place an image holder (for the watermark) above the normal image by using a position of absolute (position:absolute;) You also need to give the normal image a position of relative to set a reference point for the absolute positioned element. Otherwise any other element with a position other than static is used as reference and if that does not exist the body will be the reference point. Although you can do this with css as described above, you need to keep in mind that this does not prevent the end user from removing this watermark. If your looking for a more permanent measure you might want to have a look in to de gd library of php. http://www.google.nl/#sclient=psy&hl=en&source=hp&q=watermark+php&aq=f&aqi=g5&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=979c06cd3d3a36aa&biw=1280&bih=676 If you need help with the css method, ones you read about positioning absolute and relative. let me know.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.