Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 09-29-2014, 11:29 AM
Loridori4's Avatar
Loridori4 Loridori4 is offline
Contributing Member
 
Join Date: 01-13-09
Location: Texas
Posts: 210
iTrader: 1 / 100%
Separate 2 java elements on my site

Hi there,

I have a floating tab for signing up for my email list, and a social sharing tab that floats right above that on my site.

How can I get the elements to have a space between them?
The email tab is partially covering the orange "MOre" block.
See my page at http://laminerals.com

here is the code I have right now:
HTML Code:
<!-- Go to [url]www.addthis.com/dashboard[/url] to customize your tools --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5429a1ac5796f85e" async> </script> <a id="webform_side_tab">Join the 10% off Club</a><script type="text/javascript" src="https://madmimi.com/signups/111386/webform_side_tab.js"></script>

Last edited by snakeair; 09-29-2014 at 04:13 PM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 10-02-2014, 01:40 AM
quickscrum quickscrum is offline
Junior Member
 
Join Date: 08-19-14
Location: Paris, France
Posts: 31
iTrader: 0 / 0%
Just use the appropriate method: String#split().
PHP Code:
String string "004-034556";
String[] parts string.split("-");
String part1 parts[0]; // 004
String part2 parts[1]; // 034556
Note that this takes a regular expressionso remember to escape special characters if necessarye.g. if you want to split on period which means "any character" in regex, use either split("\\.") or split(Pattern.quote(".")). 
To test beforehand if the string contains a -, just use String#contains().

PHP Code:
if (string.contains("-")) {
    
// Split it.
} else {
    throw new 
IllegalArgumentException("String " string " does not contain -");

No, this does not take a regular expression.

Last edited by snakeair; 10-02-2014 at 05:09 AM.
 
Reply With Quote
  #3  
Old 10-03-2014, 03:02 AM
georgeweballey13's Avatar
georgeweballey13 georgeweballey13 is offline
Contributing Member
 
Join Date: 09-26-14
Location: athens,greece
Posts: 162
iTrader: 0 / 0%
I cant find none of these element that you mentioned!

"I have a floating tab for signing up for my email list, and a social sharing tab that floats right above that on my site. "

Where is the emailing list????
 
Reply With Quote
  #4  
Old 10-03-2014, 09:18 PM
brealmz's Avatar
brealmz brealmz is offline
Contributing Member
 
Join Date: 04-10-07
Posts: 90
iTrader: 0 / 0%
i looked at your website and you can try adding this on your stylesheet.
a#webform_side_tab {
top: 60% !important;
}

currently your "Join the 10% off Club" is 50% from top and i think it was auto generated
 
Reply With Quote
  #5  
Old 10-08-2014, 12:20 PM
Loridori4's Avatar
Loridori4 Loridori4 is offline
Contributing Member
 
Join Date: 01-13-09
Location: Texas
Posts: 210
iTrader: 1 / 100%
Image of what I'm referring too.
 
Reply With Quote
  #6  
Old 10-08-2014, 12:21 PM
Loridori4's Avatar
Loridori4 Loridori4 is offline
Contributing Member
 
Join Date: 01-13-09
Location: Texas
Posts: 210
iTrader: 1 / 100%
Quote:
Originally Posted by georgeweballey13 View Post
I cant find none of these element that you mentioned!

"I have a floating tab for signing up for my email list, and a social sharing tab that floats right above that on my site. "

Where is the emailing list????
Left of the site...the burgundy tab that says "Join the 10% off club"
 
Reply With Quote
  #7  
Old 10-10-2014, 02:00 AM
robert122 robert122 is offline
Junior Member
 
Join Date: 10-09-14
Location: New York
Posts: 1
iTrader: 0 / 0%
Just follow the example about separate java elements,

public class Main {

public static void main(String[] args) {

String speech = "Four score and seven years ago";
String[] result = speech.split("\\s");
for (int x=0; x<result.length; x++) {
System.out.println(result[x]);
}

}

}
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Should I use a separate IP address for each country-specific site? - Google HTMLBasicTutor Google Forum 0 12-19-2013 12:13 AM
How to embed Java games into site? MichaelB23 Coding Forum 6 06-02-2009 07:35 PM
Need to change elements of a new site simebern Coding Forum 3 11-04-2008 02:29 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 04:12 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC