473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Linking a style to a specific anchor tag

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
5 4988
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nam | last post by:
could someone please help me with this bizarre problem - I've created a swf file at the top of my html page. The swf file (using Swish) is simply a menu of 5 links to 5 anchor points on the html...
1
by: Ang Talunin | last post by:
Hey, I've got this code: <html> <head> <style> a{cursor:hand;text-decoration:none;font-size=10pt;font-family:Verdana;} a:hover{cursor:hand;text-decoration:underline;} </style>
14
by: eric | last post by:
I am attempting to create <A HREF> links to <A NAME> targets in a series of extremely wide web pages composed of tables with text and images sitting side by side. This is a failure since both...
2
by: bill yeager | last post by:
I'd like to link to another part of my document within my aspx page. I have the following code in my HTML: <code> <A HREF="#PositionsHeld">Positions Held</A> <asp:label id="lblPosition"...
15
by: phillip.s.powell | last post by:
<style> div div table tr td a.navbar, div div table tr td font {display: none;} </style> <div class="navigationbar" style="background-color:Black; position: absolute; left:50%; top:127px;...
6
by: sowencheung | last post by:
is it possible to get the currently linking element? for example, I wire up an onclick event for some anchor tags, is it possible in this onclick event, I can know which anchor tag is being...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
4
by: yawnmoth | last post by:
Say I wanted to make a link change colors when someone was hovering over it. Ordinarily, I could do that by doing something like... <style> a { color: whatever; } a:hover { color:whatever;
5
by: Kalpana Durairaj | last post by:
I want to insert my image within search result anchor(say google search results). <a href="http://www.codeproject.com">Code Project <!-- Google search result link--> <img src="myimage.png"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.