?
Solved

Place both links on the same line.

Posted on 2011-03-20
10
Medium Priority
?
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
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 …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses
Course of the Month14 days, 18 hours left to enroll

771 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