• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1667
  • Last Modified:

How to align anchor tag?

I've added a tooltip to this page http://www.economicdecryption.com/default.aspx.  It's the blue exclamation icon near Globl Factory Index and Baltic Dry Index.   How do I get the info icons to align on the right side of header text rather than under it, as they are now?
0
brettr
Asked:
brettr
  • 3
  • 3
  • 3
2 Solutions
 
mverschoofCommented:
easiest way is to set the display to block. This way it becomes an block element like a div and positioning will be easier.
Or you can try using float:right. The text to it's left shoulf have float:left or it won't work.

Hope this helps
0
 
brettrAuthor Commented:
In the .bullet-help, at the top of this page, I already have it set as block display.  I did set float:right and that is better.  

I put the text into its own div to float:left, since putting float:left in the parent would cause the entire blue header to have a smaller width and the content text (below) to then move up along the left side.  Is there a way than adding the additional div?  Take a look at the div surrounding "Global Factory Index" to see what I mean.

One off question, what is the difference to say:

h1.contentBox

vs.

contentBox
0
 
mverschoofCommented:
h1.contentBox is an element with the class contentBox INSIDE a h1 tag
.contentBox is any element with the class contentBox

About the rest i will look at it tomorrow
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
brettrAuthor Commented:
Does h1.contentBox mean all H1 tags will use he class contentBox implicitly?
0
 
David S.Commented:
> Does h1.contentBox mean all H1 tags will use he class contentBox implicitly?

No. CSS can't control the IDs or classes that are applied to elements. That will only select <h1> elements that belong to the "contentBox" class.
0
 
brettrAuthor Commented:
So if I do

<div class="contextBox">some text here</div>

it won't have any affect because its not an H1 tag?
0
 
David S.Commented:
Correct.
0
 
mverschoofCommented:
Exactly.

About the other question: I've looked at the code and there have to be tags around the title text in order to give it a float. It does not have to be a div but it can be any tag you like. It may be needed to give it a display:block if it's an inline tag.

Hope this helps
0
 
David S.Commented:
> It may be needed to give it a display:block if it's an inline tag.

Floating an inline element automatically makes it be treated as if it had display:block.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

  • 3
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now