Solved

Place both links on the same line.

Posted on 2011-03-20
10
142 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change Background Color of Website 5 29
Increase the size of the modal in Bootstrap 5 43
Adding bootstrap to only Content page and NOT master page 1 49
Css regex 6 38
CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
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…

840 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