Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-14-2010, 05:01 PM   PM User | #1
apptoychest
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
apptoychest is an unknown quantity at this point
Links in <li> work in body, but not inside div

Hey all, long time fan of Coding Forums, and recently have gotten some great help here so I thought I'd try again:

http://www.kidseducationalapps.com/

Note the links in the top:

Code:
<ul>
<li><a href="http://www.kidseducationalapps.com/app-ipad-iphone-android-faq/">Submit an App</a></li>
<li><a href="http://www.kidseducationalapps.com/app-ipad-iphone-android-faq/">FAQ</a></li>
<li><a href="http://www.kidseducationalapps.com/app-ipad-iphone-android-faq/">Advertise</a></li>
<li><a href="http://www.kidseducationalapps.com/app-ipad-iphone-android-faq/">Contact</a></li>
</ul>
When I move this snippet of code outside of the main "wrapper" div, the links work fine. However, when I move them inside the div so the links sit nicely on top of the page, they stop working. This is across browsers...

What would cause the links to go dead like that?
apptoychest is offline   Reply With Quote
Old 12-14-2010, 05:11 PM   PM User | #2
apptoychest
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
apptoychest is an unknown quantity at this point
OK this is even weirder... if you hover over the links, it seems like only some of the letters in the link actually link.

As if the linkable area has been squashed...
apptoychest is offline   Reply With Quote
Old 12-14-2010, 05:15 PM   PM User | #3
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
The problem is due the negative top margin on #nav, which is causing that div to be positioned over most of your links. It's not over the first three characters of "Submit a link", which is why you get the odd behaviour. If you make your #nav css:

Code:
#nav {
    float: right;
    font-size: 14px;
    height: 65px;
    margin-right: -4px;
    margin-top: -87px;
    /*padding-left: 230px;*/
    position: relative;
    text-align: right;
    white-space: nowrap;
}
That looks like it solves the problem.

EDIT: Firebug is great for spotting this sort of thing.
SB65 is offline   Reply With Quote
Old 12-14-2010, 05:35 PM   PM User | #4
apptoychest
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
apptoychest is an unknown quantity at this point
Great catch! I loaded up firebug and saw the exact think you were describing! Thanks so much.

Love this place!
apptoychest is offline   Reply With Quote
Reply

Bookmarks

Tags
a href, div, link, list item

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:46 AM.


Advertisement
Log in to turn off these ads.