File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Using Hyperlink Tag in Div Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Using Hyperlink Tag in Div Tag" Watch "Using Hyperlink Tag in Div Tag" New topic
Author

Using Hyperlink Tag in Div Tag

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
I have a div tag in which I have hyperlinks. If I have more than one link and link text is longer than 12 characters the div tag displays correctly but part of the links seem to spill over onto the bottom of the page.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65



Not nearly enough info to even hazard any guesses.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
Bear Bibeault wrote:

Not nearly enough info to even hazard any guesses.


Don't really know how else to explain it. Here is my div tag code.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

Good grief! What is all that style doing mixed up with the structure HTML? It makes your code completely unreadable. Factor all that out to the head, or a stylesheet.

Also, remove the "javascript:" pseudo-protocol from onclick attributes. I'd tell you to get rid of those altogether, but I guess I've done enough moaning for now.

And I'm not just being picky. Clean code is the first step to either finding problems like this, or solving them just by putting everything in its proper place.

I suspect that your absolute positioning and sizing is constricting the block too much for its content, but its hard to tell from inspection.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Hyperlink Tag in Div Tag
 
Similar Threads
Icefaces error messages
Disable an image anchor
How to effectivly Produce a Menu with Popup Options
Div Tag Width Changing si Undesireable
DOM - remove text question