Jump to content

segwaypirate

New Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by segwaypirate

  1. segwaypirate

    rollover

    So I've got a bunch of buttons that I want to shift when hovered on to create a rollover effect. Since there is a bunch of them I used a class "icon." Here's the css: .icon { display: block; width: 25px; height: 25px; position: absolute; bottom: -5px; } a.icon:hover { background-position: 0 -25px; } .icon span { display: none; } #pic { float: left; padding-right: 30px; padding-bottom: 30px; font-size: 16px; font-weight: bold; position: relative; } Here's the html: div id="pic"> <img src="../images/joel_200.png" alt="<p>me</p>"></img> <a class="icon" href="http://#######.com/index.php" title="Home" style="background: url('../images/home.png') no-repeat 0 0;"><span>Home</span></a> <a class="icon" href="../contact.php" title="Contact" style="background: url('../images/contact.png') no-repeat 0 0; left: 30px;"><span>Contact</span></a> <a class="icon" href="http://www.facebook.com/sharer.php?u=#######.com<?php echo $_SERVER['PHP_SELF'];?>" title="Facebook" style="background: url('../images/fb.png') no-repeat 0 0; left: 60px;"><span>Facebook</span></a> <a class="icon" href="#" title="Twitter" style="background: url('../images/twitter.png') no-repeat 0 0; left: 90px;"><span>Twitter</span></a> </div> The above doesn't work. What am I missing?
  2. Here is the code in question: <form method="post" action="../php/sendmail.php"> <?php function RandomLine() { $textfile = "../messages/compliments.txt"; if(file_exists($textfile)) { $compliments = file($textfile); $string = $compliments[array_rand($compliments)]; } else { $string = "Error"; } return $string; } $line = RandomLine(); echo "<p style='color: red;'>"."$line"."</p>"; ?> <br> <input type="hidden" name="email" value="email@email.com"> <input type="hidden" name="subject" value="random compliment generator"> <input type="hidden" name="message" value="$line"> <input type="hidden" name="to" value="5555555555@mms.uscc.net"> <input type="submit" name="sendtext" value="Send to phone!"> </form> And here is the php from sendmail.php: <?php $email = $_REQUEST['email']; $subject = $_REQUEST['subject']; $message = $_REQUEST['message']; $to = $_REQUEST['to']; $sent=mail($to, $subject, $message, "From: $email"); if($sent)echo "<br><p>The message was sent!</p>"; else echo "<br><p>There was an error while sending the message.</p>"; ?> When the form from the first bit of code is opened in an iframe, the echo displays the correct code but if the button is sent, the sms/email received simply says "$line". Any ideas?
  3. I created a horizontal scrolling site with the technique found in this tutorial: http://css-tricks.com/how-to-create-a-horizontally-scrolling-site/ A link to the demo of the technique described above can be found here: http://css-tricks.com/examples/HorzScrolling/ To get the horizontal scrolling site, the jquery .wrap function is used to put each post in into its own cell of a single row table. This works fine if using only short articles. If an article is too long the result is a single column with a vertical scroll bar. Instead I want the text to fill up the first cell which is 500x200 px and then wrap into the 500x200 px cell to its right. Breaking up the text is easily done with the markup that causes a new column. In this case its <div class="post"></div>. The issue is that when my site is populated with content, how can I determine when the first container would be full so that the tags should be printed to begin populating the next container? If this can be solved with just html/css i'll be impressed.
  4. The browser does determine where the wraps will be until the text gets to the end of the 500x200 pixel column and I want to it to wrap into a different one which is a new div/container. The point is to figure something out without changing the look of the site.
  5. I've got a horizontal scrolling site where all the text is justified into columns that are 500px by 200px. Currently the page displays 8 columns with 8 different articles, each one with a vertical scroll if required. While this is nice, I'm working on giving the option to view just one whole article at a time where the text spills over into the next column. wordwrap() might not be able to cover this one as it only works in characters not pixels and I'd prefer to not need a font with fixed character widths. The best way I can think to do this would be to somehow detect the point at which the css overflow would kick in. Any guidance or insight would me much appreciated!
×
×
  • 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.