Jump to content

calabiyau

Members
  • Posts

    272
  • Joined

  • Last visited

    Never

Everything posted by calabiyau

  1. Look up "internet explorer conditional statements" and you can feed specific css to IE.
  2. I fixed width wrapper div around all the other divs might be what you are looking for. <div id="wrapper"> <div ...... <div...... ///all your divs in here </div> then in your css give the wrapper the maximum width you want your content to be and a margin-left: auto; margin-right: auto; position: relative; then you will be absolutely positioning your other divs relative to the wrapper div which will always remain centred on the page, so you will have to go through all your other divs and realign them according to the wrapper, not the edges of the body, if that make sense But like others have said, for the layout it looks like you are trying to make, floats would probably be a better idea, if you want a footer at least
  3. Even Firefox has color matching issues at times between images and html rendered colors. I have given up and basically where I can I use a small background image of the color i'm trying to match set to fill the space of the body or whatever container your using
  4. If that doesn't work, try an inline style within your img tag <img src="" style="border: none;"/>
  5. Try .imgblock a img {border: none;} or is it .imgblock a img {border: 0;}
  6. AHHHH...okay I think I got you. So the fact that the data i'm seeking is only numbers allows me to use a very general statement to split it up by any sequence of characters that are not numbers. fiendishly simple. thanks to both of you. i will look into this alot further.
  7. THANK YOU! Works beautifully on my limited dataset. Just so I learn something here....what exactly does the /\D+/ part do, how is this representative of the (100)+++(100), is it related to the (100) or to the )++==(, I see no indication of any of the symbols, so is it a special instruction specially for things involving parenthesis, or some kind of built in pattern seeker?
  8. Okay I have a data field something like below (100)+(100)++(200)===(100)++(200)++(200)== there can be any number of + or = signs between blocks within the paranthesis. I am stumped on how best to extract all the values into an array that are contained within paranthesis. so for above example array = "100,100,200,100,200,200" I know I could do an series of explodes and multiple looping array routines to get to the data but I thought there must be a regular expression solution to this. I looked into split and preg_split but can't come up with the regular expression that would represent ) plus any number of +== ( or perhaps there is someway to simply extract every value that occurs between ( ). Anybody can help with this?
  9. Okay my mistake, on further investigation, the ajax side was okay, needed html_entity_dedode on the php side to convert the characters back. Everything works great now. For anyone who isn't clear on the relationships between ajax and php, this website has a neat little gadget that explains how they all relate http://www.the-art-of-web.com/javascript/escape/
  10. I am building my own framework and have used "editarea" as my online code editor. I use ajax to open and save files from the server. everything is working properly, except one thing. I discovered that in order to get the save to work I had to use the javascript escape() function before sending the post request to the server, otherwise the & symbols in the code messed up the post request. Now the problem is if the code contains something like this: $server_path = "C:\server\apache\www"; When it saves the file, it comes out like this: $server_path = "C:serverapachewww"; I do a strip slashes on the php receiving end before saving the file to get rid of the escapes created by the javascript end, and through alerts discovered that that is not the problem. They are being eliminated before the ajax request is sent. Anybody have any ideas on how to resolve this problem? Am I using the wrong approach?
  11. I am building my own framework and have used "editarea" as my online code editor. I use ajax to open and save files from the server. everything is working properly, except one thing. I discovered that in order to get the save to work I had to use the javascript escape() function before sending the post request to the server, otherwise the & symbols in the code messed up the post request. Now the problem is if the code contains something like this: $server_path = "C:\server\apache\www"; When it saves the file, it comes out like this: $server_path = "C:serverapachewww"; I do a strip slashes on the php receiving end before saving the file to get rid of the escapes created by the javascript end, and through alerts discovered that that is not the problem. They are being eliminated before the ajax request is sent. Anybody have any ideas on how to resolve this problem? Am I using the wrong approach?
  12. http://ca3.php.net/unset should do the trick.
  13. Great website. You were wondering what to do with the header portion. What about if you continue the background gradient from the top-left all the way across the header and make the rounded rectangle in the top-right the same maroon theme color from the navigation. Might be a way to add some punch to that section. I dunno. Looks really nice though.
  14. there are tons of good hosts out there for less than 10.00. Try out webhostingtalk.com I think it's called to get some reasonably frank discussion on it. I would stay away from the hosts that offer you 1000 Gb storage and 1000GB traffic, type deals. they are overselling to the extreme and if they don't be careful can have a very poor server. almost every host oversells to some extent though. just try and use a fraction of those resources and see how quickly you are booted for using too much cpu. but all hosts will limit some of php's activity as much of it is not safe for a shared server.
  15. Use both, I would say. Sessions are most commonly used with cookie's in combination. The session is the data stored on the server and the cookie is stored on the user's machine. Only by recieving the "matching" cookie to go with the session does session work. You can use sessions on their own and pass the data via the url but that comes with it's own set of security problems.
  16. Hard to know without seeing all the code but may be as simple as applying body { margin: 0; padding: 0;} in your css
  17. the header is nice, IMO, but too tall, and the flash movie in the header, while well done, doesn't blend into the header very well. It just looks like it's kind of floating over top. I think what would be cool, is to fit the movie into the oval shape where currently is a phone number, but actually let it's borders be the oval shape, not just drop the rectangle into it. Then move the CCC down so it sits closer to the gray curve, and drop the first third of the header entirely. Eh...just an idea, but it looks pretty good as is, just kind of a lot of space that doesn't serve any purpose in the top of the page.
  18. Trying to create a javascript color picker to populate a text field for CMS. On clicking the box to open color picker calls a js function that is supposed to create an outer div to hold the colors together and then small inner divs each with a background color. Clicking on the color sends the value to the text field. I've got it working to a point. Generates all the divs, but i am trying to use attachEvent (I know it's only IE for now) on the divs to allow them to be clickable and call the function to poplulate the text field. No matter which color is clicked, it always populate the text field with the value of the very last color div to be created. Hopefully a js expert can help me understand what's going on here. I generally just muddle my way through js without really totally understanding how the objects and things relate to each other. Should mention that I tried using an array when looping through the colors, as I though maybe it was being overwritten by using single variable. It's like the function part of attachEvent can't be applied to multiple elements. Sorry if my terminology is not correct. Like I said I usually just muddle through. Thanks for any help. <html> <head> <script type="text/javascript"> function getColors() { //alert("inside the array function"); masterColors = new Array(); masterColors[0] = "ffffff"; masterColors[1] = "000000"; masterColors[2] = "00667f"; return masterColors; } function Test(selected_color) { alert (selected_color); document.getElementById('boxborder').value = selected_color; document.getElementById('select').style.background = selected_color; } function openColors(field_id) { //alert ("inside the function"); colorArray = new Array(); colorArray = getColors(); //document.write(colorArray); var newElement = document.createElement("div"); document.body.appendChild(newElement); newElement.style.width = 200; newElement.style.height = 200; newElement.style.background = "gray"; newElement.style.position = "absolute"; newElement.style.left = 200; newElement.style.top = 200; newElement.id = "div1"; newElementB = new Array(); for (x=0; x<colorArray.length; x++) { currentColor = colorArray[x]; newElementB[x] = document.createElement("div"); newElementB[x].style.width = 20; newElementB[x].style.height = 20; newElementB[x].style.background = "gray"; newElementB[x].style.position = "absolute"; newElementB[x].style.left = 200 + (20*x); newElementB[x].style.top = 200; newElementB[x].style.background = colorArray[x]; newElementB[x].id = x; document.body.appendChild(newElementB[x]); //newElement.appendChild(newElementB[x]); newElementB[x].attachEvent("onclick",function() {Test(currentColor)}); } } </script> </head> <body> <a href="#" onclick="openColors('boxborder');"> <div id="select" name="select" style="width: 20px; height: 20px; border: 1px solid black;"> </div> </a> <form method="post" action="js-test.htm"> <input type="text" name="boxborder" id="boxborder" value="000000"/> <input type="submit" value="SAVE CHANGES"/> </form> </body> </html>
  19. Remember the centre column is floated left so it sits to the left hand side of main container, then it is moved into position with margin-left. and then the left column is floated left, so it would sit right up against the right hand side of centre column. Then the left column is moved, through negative margins into it's position. It has to move through the entire width of the centre column and the entire width of the left column to slide into place. If you move center div to the right a little you have to adjust the negative margin on the left div to compensate. It has to travel a farther distance to get to where you want it to sit now, so you need to increase the negative margin on left div, by whatever distance you move the centre div. Does this make sense?
  20. Okay it's not perfect but just tested in IE 6 and Firefox and seems the general idea is right. Change your container div from position: absolute; to position: relative; and give it a padding-top equal to the height of your header div. Then position the header absolutely within the empty space. As for the columns, float the center column left and give it a margin-left equal to the width of the left column. For IE 6 you can use a conditional comment (I used an old hack here cuz I can never remember CComment syntax) to serve a special rule about the margin-left, since IE 6 will sometimes double left margin when item is floated. You need to give it margin-left equal to half what it should be. Then float left column to the left. It will sit up against the center column now, so we give it negative margin-left equal to the total width of the center column and the left column. This pulls it across and slides it into place. Then float the right column to the left and it should just fit in there. I used an empty div to clear the floats for firefox so footer will sit at the bottom, as it wouldn't recognize my command in header div. I notice your widths do not add up to the total width of container, so if you plan to have space between column elements you will have to take that into consideration in your totals. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Your Site</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <style type="text/css"> body { margin: 0; margin:0 15px 0 0; text-align: center; } #Container { position: relative; padding-top: 245px; z-index:1; width: 700px; height:auto; margin-left: auto; margin-right: auto; border-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-color: #ccbbaa; background-color: #ffffff; text-align:left; } #ActionContainer { margin:0 0 0 0; text-align:left; border:1px solid orange; } #CenterContainer { float: left; margin:0 0 0 150px; text-align:left; border:1px solid yellow; width:250px; } *html #CenterContainer {margin: 0 0 0 75px;} #LeftContainer { float:left; margin:0 0 0 -410px; text-align: left; width: 150px; border:1px solid green; } #RightContainer { margin:0 0 0 0px; text-align: left; width: 150px; border:1px solid blue; float:left; } #HeaderContainer { clear: left; position: absolute; left; 0; top: 0; margin:0 0 0 0; width: 700px; height: 245px; border:1px solid red; } #FooterContainer { margin:0 0 20px 0; padding:0 0 30px 0; border:1px solid blue; display:block; } </style> </head> <body> <div id="Container"> <div id="ActionContainer"> <div id="CenterContainer">CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer, CenterContainer.</div> <div id="LeftContainer">LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer, LeftContainer.</div> <div id="RightContainer">RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer, RightContainer.</div> <div style="clear: left;"></div> </div> <div id="HeaderContainer">HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer, HeaderContainer.</div> <div id="FooterContainer">FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, FooterContainer, </div> </div> </body></html>
  21. css: #content div {float: left;} #left {width: 100px;} #center {width: 550px;} #right { width: 100px;} EDIT...Just thought, maybe #content div isn't the best way to go, since you may have div's inside the column that it might affect. Just add the float: left; into each of left, center, right div's.
  22. Maybe you could say a little about what this is all about? I'm not really clear on what you're trying to accomplish. Sessions are normally used to either maintain information about a user between pages or to restrict access to certain parts of your website. If you are trying to restrict acces to a mail form( just an educated guess), then you need some kind of membership system of usernames and passwords and if they enter the correct combination, THEN you set the session variable. What are you trying to do?
  23. You have alot of posts so maybe you've eliminated this as a problem, but is your php.ini set up to receive large files as an mp3 of any length may be?
  24. I've always been lead to believe that session only ends when browser is closed, not on leaving a site. What is the source for that information? I"m curious if I am wrong about this.
×
×
  • 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.