-
Posts
286 -
Joined
-
Last visited
Everything posted by Hybride
-
First, every CSS file you make, there should be a *{margin:0;padding:0} at the top. I see you have in the middle, but it's just easier (so they say) to have it the first thing, so rather than rendering all the code and *then* hitting *, it's the first piece the browser sees. Are those borders on the images and going down, or is it just for the li you have? If IE is recognizing the images with a border, try setting the images with a border:0; . You can also change your <body class="pw" background="./images/back.png"> by putting the background image into your CSS body tag. For the heights, you can try a min-height, or just set height to 100%. Do you have a link to the site? Might be easier to edit the code live with firebug. If not, post up new results if you have any.
-
I know this is deprecated, however, you can try and use: <td width="xxx"></td> or if you are going to the CSS way, <style type=”text/css”> <!-- td{max-width: xxxpx;} --> </style>
-
Through external or even internal CSS files. For example: <p style="color:white;">This is white text</p> <p style="color:blue;">This is blue text</p> If you want to reuse your styles, you can do this: p#white { color:white} p#blue{color:blue} <p id="white">This is white</p> <p id="blue">This is blue</p> More help at: W3Schools CSS
-
MySQL change password?
-
if(isset($link1)) { $_SESSION['var'] = $link_id1; } else { $_SESSION['var'] = $link_id2; } ? An if/else statement works; if it gets more complicated, you can do a switch/case. It'd help if there were code attached to see what you are trying to do.
-
Not a guru by any means, but from what am seeing, you don't have any position:relative to help actually position your tabs.
-
Is that your entire code? Try this: <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="292" height="290"> <param name="src" value="my_clip.mp4"> <param name="autoplay" value="true"> <param name="controller" value="true"><embed height="290" pluginspage="http://www.apple.com/quicktime/download/" src="my_clip.mp4" type="video/quicktime" width="292" controller="true" autoplay="true"> </object> Media Quicktime should be of help.
-
//creates a text file counter to read and write to function counter() { global $dat; $countFile = dirname(__FILE__)."/counter.txt"; if(!file_exists($countFile)) { $fh = fopen($countFile, 'w') or die("Can't open Counter"); $dat = @fread($fh, filesize($countFile)); fclose($fh); } else { $fh = fopen($countFile, "r") or die("Can't read Counter"); $dat = fread($fh, filesize($countFile)); fclose($fh); $fh = fopen($countFile, "w") or die("Cant write to Counter"); fwrite($fh, intval($dat)+1); // at x number, in this case 5, rewrite file and start counter over if($dat == 5) { $fh = fopen($countFile, 'w'); fwrite($fh, intval(1)); // timeCheck(); } fclose($fh); } } $dat = counter(); function timeCheck() { global $dat; $t = time(); $b = date("h:i A", $t); $fileName = "links2.php"; if (($b == "00:01 AM") || (!file_exists($fileName))) { //at 12:01 AM, go and update file $fileHandle = fopen($fileName, 'w') or die("can't open file"); fclose($fileHandle); $fh = fopen($fileName, 'w'); $stringData = file_get_contents('links.php'); fwrite($fh, $stringData); fclose($fh); rename("links2.php", dirname(__FILE__)."/links2.php"); } if(file_exists($fileName)) { $link = dirname(__FILE__)."/links2.php"; $handle = fopen($link, 'r'); $lines = file($link); if($dat == 5) { shuffle($lines); array_pop($lines); } print end($lines); fclose($handle); } } The first function is the counter, that part works. The second function is the one that I have a problem with. What it's supposed to do is at a certain time, go out and grab the file in question if it does not exist or it is at that required time. When it does, it opens the file and puts all the contents into an array. What it's supposed to do is after the counter goes to a certain number (say 5 in this case), it's supposed to print the next line from the array, but it doesn't. I tried using pop/shift, end, shuffle and all the array features to try and get the next line to read, but have no idea how to actually to get it to go to the next line. I tried shuffling after a certain number, but the shuffled result does not stay, it always goes back to the first value. (That's what I have in the function right now.) I have to point out also that databases cannot be used, hence why all the files. Any ideas?
-
Help with opacity on background image, but not <th> text contents.
Hybride replied to Darkmatter5's topic in CSS Help
This tutorial may be of some help: Transparencies. You could try something like: #pc_toolbar_cell { -moz-opacity: 0.25; filter: alpha(opacity=25); opacity: .25; background-image: url(../images/nuclear.png); background-repeat: no-repeat; background-position: center; } #pc_toolbar_cell p{ color:#000 } <th width='25%' height='100' id='pc_toolbar_cell'><p>test</p></th> -
As you noted, building a site with a table design is a big no-no. Here's a tutorial about it: CSS layouts. I would sincerely suggest you redo the layout you have into CSS style. It may be a pain to redo, but in the long run, it's much more clean, elegant and easy to fix. Also, your question "Why do some of them work" is kinda ambiguous: what do you mean they position correctly and other's don't? Which do and which don't?
-
Please use the {code}{/code} next time for your code... Secondly, mouseover menu bar is about a different a:hover tag. What exactly are you trying to achieve in yours?
-
[SOLVED] insert record only when auth-code is right
Hybride replied to bluecuracao's topic in MySQL Help
Also, that line you mentioned: if ($RSauth == $_POST['auth']) there is no mention of $_POST['auth'] anywhere in the code. You were using an "auth" table, but that's not the same thing. -
Here's a nice tutorial: Setting up new user
-
What kind of spacing are you looking for? Margin is for around borders, padding is within borders, letter-spacing is space between letters, among others. Please be more specific. <div style="margin: 10px"> Hello World </div> This would give you a margin of 10px all around the "Hello World". <div style="margin-top: 10px"> Hello World </div> Would give a margin of 10px from the top only.
-
Just throwing this out there (never used FIS before), but it might be a parenthesis issue? Try: select userid,username,membergroupids,lastvisit from user WHERE FIND_IN_SET('146,', membergroupids) AND (FIND_IN_SET('$id1', membergroupids) or FIND_IN_SET('$id2', membergroupids)) order by username asc
-
[SOLVED] ie8 vs. everything else. Width issue (i think)
Hybride replied to monkeytooth's topic in CSS Help
First thing I noticed was you were lacking a: *{padding:0; margin:0} tag. This resets all browsers' padding/margin to 0. You should try also changing the html{} tag to margin:0; . -
I don't think you need the "overflow-y", it's actually just "overflow", and make sure to specify the width of your body, ie "width: #px".
-
Try a switch/case statement.
-
Maybe they should stop letting stupid lawsuits like this get into court in the first place. Like the McDonald's coffee one. Or the McDonald's-Made-Me-Fat one. Or the guy suing Guinness World Records because he got the title of the guy who made the most lawsuits.
-
It looks like an image problem, but my suggestion is to mess with the CSS ids/classes that have the images; also, looking at it, you can use the shorthand version of CSS (instead of declaring font weight, font style, font variant, just use font) which can make it easier to read/load and understand.
-
Where exactly is the extra border? In your image? the menu? If in the image, try adding a border=0 to the image. <img src="image.jpg" border="0" width="" height="" /> If it's the CSS style, try compacting what you have: div.head {border-bottom: 1px solid #0066FF; background-color: #0099FF; height: 100px; }
-
Am working for this company who requested me to put up their old website up due to some problems with the new company. Unfortunately, I have never programmed in VBScript and this code is about 10 years old (from what they tell me), so I have zero comments to go by as the old company was kind enough not to write any in. I receive the error: I get that the object has to be initialized, however, I have no idea how or where. This is the ApplicationVariableRefresh page: <SCRIPT LANGUAGE=VBScript RUNAT=Server> sub ApplicationVariableRefresh application.lock Application("WSCommerceInitialized") = "1" dim rs,Conn set conn = DatabaseConnectDefault if isObject(Conn) then set rs = conn.execute("sproc_ApplicationVariablesRetrieve") while not rs.eof application(trim(rs("Name"))) = Trim(rs("Value").value) rs.MoveNext wend end if application.unlock end sub </script> From the error line, that would be the "set conn = DatabaseConnectDefault." Here is the database connection script: <SCRIPT LANGUAGE=VBScript RUNAT=Server> function DatabaseConnectDefault dim Conn dim ConnectString dim SQLServer dim UserID dim Password dim Database SQLServer = "localhost" UserID = "user" Password = "pass" Database = "database" ConnectString = "driver=SQL Server;server=" & SQLServer & ";uid=" & UserID & ";pwd=" & Password & ";database=" & Database & ";" Err.clear on Error resume next Set Conn = Server.CreateObject("ADODB.Connection") conn.connectiontimeout = 120 conn.CommandTimeout = 120 Conn.open ConnectString if err.number = 0 then set DatabaseConnectDefault = Conn else DatabaseConnectDefault = NULL end if end function function DatabaseConnect(SQLServer, UserID, Password, Database) dim Conn, ConnectString ConnectString = "driver=SQL Server;server=" & SQLServer & ";uid=" & UserID & ";pwd=" & Password & ";database=" & Database & ";" Err.clear on Error resume next Set Conn = Server.CreateObject("ADODB.Connection") conn.connectiontimeout = 120 conn.CommandTimeout = 120 Conn.open ConnectString if err.number = 0 then set DatabaseConnect = Conn else DatabaseConnect = NULL end if end function </script> If anyone has an idea or can help, I'd be very much obliged. Thanks!
-
echo output(); ?
-
Why are you absolutely positioning the container? Try relative instead, and if you want to center, do margin:0 auto; /* you can also do margin: 0; or margin:auto; if am not mistaken*/ And make sure if you're doing cross-browser compatibility, to add: *{padding:0;margin:0} That resets any margin/padding discrepancies between browsers to 0.
-
if (MODULE_TEST_STATUS == 'true') { $this->form_action_url = 'https://website.page1.com'; } elseif { $this->form_action_url = 'https://website.page2.com'; } else { $this->form_action_url = 'https://website.page3.com'; } } Though if you're going to do more, I sincerely recommend looking up switch/case statements.