Link to home
Start Free TrialLog in
Avatar of brettr
brettr

asked on

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?
Avatar of mverschoof
mverschoof
Flag of Netherlands image

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
Avatar of brettr
brettr

ASKER

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
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
Avatar of brettr

ASKER

Does h1.contentBox mean all H1 tags will use he class contentBox implicitly?
Avatar of David S.
> 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.
Avatar of brettr

ASKER

So if I do

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

it won't have any affect because its not an H1 tag?
SOLUTION
Avatar of David S.
David S.
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> 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.