This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Hyperlink Tag in Div Tag

 
Steve Dyke
Ranch Hand
Posts: 1616
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Not nearly enough info to even hazard any guesses.
 
Steve Dyke
Ranch Hand
Posts: 1616
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic