Solved

Place both links on the same line.

Posted on 2011-03-20
10
138 Views
Last Modified: 2012-05-11
How can I have both the Twitter and the "Compartir" (Share in Englsh) link that appears below it; instead, have it diesplay on the same line.  Twitter left justified and "Compartir" right justified.

Also, is there a "Share"  icon that matches better with the site.  The red might stand out too much.

Thanks,
JP
0
Comment
Question by:easycapital
  • 5
  • 5
10 Comments
 
LVL 3

Expert Comment

by:brdavs
ID: 35176393
This (without CSS) make both appear on the same line:
<a id="twitter-link" href="#">Twitter</a> <a id="share-link" href="#">Compartir</a>

Open in new window


This CSS will make them go in separate lines:
a { display: block; }

Open in new window


This will make them appear in the same line, first justified to the left and the second to the right.
a { display: block; }
a#twitter-link { float: left; }
a#share-link { float: right; }

Open in new window


By the way. You have not given us enough data to help you with. You should show us a page with the problem and we'd solve it.

Best regards!
0
 

Author Comment

by:easycapital
ID: 35176588
Could you see why the page displays the code?

Thanks,
JP
0
 
LVL 3

Expert Comment

by:brdavs
ID: 35176591
I do not understand the question. I cannot see the page because you have not given me the URL. It would be easier for me to help you with the problem.

Best regards.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:easycapital
ID: 35176600
0
 
LVL 3

Expert Comment

by:brdavs
ID: 35176648
Argh!
Sorry, but you cannot paste stylesheets into your HTML.

Now for the hard part. Your HTML is not very nice in this widget. It's actualy not stylable as it has in-line styling there. You have a tweeter link hanging alone and a "Compartir" button inside a division (<div class="addthis_toolbox addthis_default_style ">
).

Can you get rid of that division, so you get 3 clear links (twitter, compartir and skype) inside a widget?
This will make all 3 links alingn inline.

Best regards.
0
 

Author Comment

by:easycapital
ID: 35176687
A bit rusty.  Could you please indicate how it should be written?

I got rid of the div you mentioned above.

JP
a { display: block; }
a#twitter-link { float: left; }
a#share-link { float: right; }

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" style="float: left;">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

<!-- AddThis Button BEGIN Share Compartir -->

<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid=xa-4d86249b41d2ea6e" class="addthis_button_compact">Compartir</a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4d86249b41d2ea6e"></script>
<!-- AddThis Button END -->

Open in new window

0
 
LVL 3

Expert Comment

by:brdavs
ID: 35176758
Start like this:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid=xa-4d86249b41d2ea6e" class="addthis_button_compact">Compartir</a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4d86249b41d2ea6e"></script>

<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
<a href="skype:easycapital?call">
  <img src="http://download.skype.com/share/skypebuttons/buttons/call_blue_transparent_34x34.png" style="border: none;" width="34" height="34" alt="Skype Me&#8482;!" />
</a>

Then if it seems wierd, we can style it using stylesheets.

Open in new window

0
 

Author Comment

by:easycapital
ID: 35176796
Ok.  Just for Twitter and Add This, how do I add the code for html. (I removed Skype).

<a id="twitter-link" href="#">Twitter</a> <a id="share-link" href="#">Compartir</a>

Thanks,
JP
0
 
LVL 3

Accepted Solution

by:
brdavs earned 500 total points
ID: 35178406
Without the skype link:

<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid=xa-4d86249b41d2ea6e" class="addthis_button_compact">Compartir</a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4d86249b41d2ea6e"></script>

Open in new window

0
 

Author Comment

by:easycapital
ID: 35184229
Brdavs:

Could you please take a look at the page, because the Twitter link should be left justified and the "Compartir" button right justified.  Please see the top right of the page. This reflects the code you mention above.
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

<a href="http://www.addthis.com/bookmark.php?v=250&amp;pubid=xa-4d86249b41d2ea6e" class="addthis_button_compact">Compartir</a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4d86249b41d2ea6e"></script>

Open in new window

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery detect if it is a mobile device 3 174
Not showing page correctly 3 40
is this a cms? 8 58
Problem with spacing columns on a row in a table 10 23
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now