By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

Linking a style to a specific anchor tag

P: n/a
Greetings, all...

I've got a (for me) stumper...

I need to attach what will amount to a float:right; sidebar to a
specific location on a page. Not an absolute position, mind you, but
to a specific anchor tag. The entire page is dynamic being generated
from a database so I will have no way of telling where on the page the
desired anchor will be.

Oh, and to complicate things even more, it will have to "break out" of
the parent container div (hence the float idea) and align to the
absolute right of the viewport.

As I said, the anchor will always be reliable as <a name="opinions">
but I don't know how to attach the sidebar to it.

Of course, it is late and I may be looking at this completely
ass-backwards, so if you have a better way of doing this, I would
appreciate your suggestions!

Thanks in advance,
Ric Castagna
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Ric Castagna
<news:45**************************@posting.google. com>:
I need to attach what will amount to a float:right; sidebar to
a specific location on a page. Not an absolute position, mind
you, but to a specific anchor tag. The entire page is dynamic
being generated from a database so I will have no way of
telling where on the page the desired anchor will be.


Can't you attach a class to that anchor and style the class
apropriately?

--
Rob - http://rock13.com/
Web Stuff: http://rock13.com/webhelp/
Jul 20 '05 #2

P: n/a
Rob,

Thanks for your feedback. Great idea, that, unfortunately I already
tried. The problem with applying the class to the <a
name="opinions"></a> tag is that I can't put valid HTML within the <a>
tag. It won't validate, but more importantly, it just doesn't render
properly.

Again, I appreciate the help, and I hope that there is an answer out
there somewhere!

Ric
Can't you attach a class to that anchor and style the class
apropriately?

Jul 20 '05 #3

P: n/a
Rob,

Thanks for your feedback. Great idea, that, unfortunately I already
tried. The problem with applying the class to the <a
name="opinions"></a> tag is that I can't put valid HTML within the <a>
tag. It won't validate, but more importantly, it just doesn't render
properly.

Again, I appreciate the help, and I hope that there is an answer out
there somewhere!

Ric
Can't you attach a class to that anchor and style the class
apropriately?

Jul 20 '05 #4

P: n/a
In article <45**************************@posting.google.com >,
ri**********@hotmail.com (Ric Castagna) wrote:
Rob,

Thanks for your feedback. Great idea, that, unfortunately I already
tried. The problem with applying the class to the <a
name="opinions"></a> tag is that I can't put valid HTML within the <a>
tag. It won't validate, but more importantly, it just doesn't render
properly.

Again, I appreciate the help, and I hope that there is an answer out
there somewhere!

Ric
Can't you attach a class to that anchor and style the class
apropriately?


Including a class or id to an <a> tag validates under HTML 4.01
transitional, but even so, I don't think this solves your problem.
Floating the anchor doesn't move the sidebar. It seems to me that you
need to enclose the sidebar in a div, and id or class that div to float
right, or wherever.
Jul 20 '05 #5

P: n/a
In article <45**************************@posting.google.com >,
ri**********@hotmail.com (Ric Castagna) wrote:
Rob,

Thanks for your feedback. Great idea, that, unfortunately I already
tried. The problem with applying the class to the <a
name="opinions"></a> tag is that I can't put valid HTML within the <a>
tag. It won't validate, but more importantly, it just doesn't render
properly.

Again, I appreciate the help, and I hope that there is an answer out
there somewhere!

Ric
Can't you attach a class to that anchor and style the class
apropriately?


Including a class or id to an <a> tag validates under HTML 4.01
transitional, but even so, I don't think this solves your problem.
Floating the anchor doesn't move the sidebar. It seems to me that you
need to enclose the sidebar in a div, and id or class that div to float
right, or wherever.
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.