• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1656
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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