Positioning a link

This is a discussion on "Positioning a link" within the Starting Out section. This forum, and the thread "Positioning a link are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 11th, 2007, 21:30
SuperMember

SuperMember
Join Date: Apr 2007
Location: Ireland
Age: 15
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Pádraig
Positioning a link

If you go to http://www.webtutorialz.com/article.php?article_id=28, and scroll to the bottom, you should see a "back to top" link.

I want to get this link to appear in the brown sidebar. However, I don't know how to get the link to stay at the bottom of the sidebar.

Does anyone have any suggestions on how I could do this?

Thanks,
Pádraig
Reply With Quote

  #2 (permalink)  
Old Aug 13th, 2007, 10:47
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning a link

I would create a bottombar div to clear the main content and navigation divs, and place the link text-aligned left, and put your view counter aligned right. Dunno if this is how it should be done though!!
Reply With Quote
  #3 (permalink)  
Old Aug 13th, 2007, 11:40
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning a link

If you put the text in the 'container' div (underneath everything but within the div), apply a clear to it and float it left, it may work. Try it and see what happens.

Pete.
Reply With Quote
  #4 (permalink)  
Old Aug 13th, 2007, 11:48
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning a link

I tried what I suggested with firebug and it seemed to work but it drops lower than the content (because it is clearing it). However, if you give it a negative margin-top of about 65px, it comes back up to roughly level with the bottom of the content. (margin-top:-65px.

Pete.
Reply With Quote
  #5 (permalink)  
Old Aug 13th, 2007, 13:30
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning a link

First solution (a bit hacky): since your content is fixed width, just offset the position of "back to top" to the left:

Code: Select all
p.backToTop [
position: relative;
left: -700px;
}
Second solution (more stable): set the sidebar to position: relative;, put the "back to top" paragraph in the sidebar (so that it is a child element of the sidebar), and then apply:

Code: Select all
p.backToTop {
position: absolute;
bottom: 0;
}
Ironically, position: absolute is relative: relative to the nearest positioned ancestor (in this case, the sidebar).

You will probably need to trigger hasLayout for IE/Win, on the sidebar. For example, set the sidebar height: 1%; in an IE-specific stylesheet. Yuck.

Last edited by MikeHopley; Aug 13th, 2007 at 13:32.
Reply With Quote
  #6 (permalink)  
Old Aug 14th, 2007, 00:17
SuperMember

SuperMember
Join Date: Apr 2007
Location: Ireland
Age: 15
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Pádraig
Re: Positioning a link

Thanks for the suggestions. We will try them out to see which one is the most effective!
Reply With Quote
Reply

Tags
link, positioning

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with icon/link positioning mcnkevin Web Page Design 1 Jun 1st, 2008 12:27
Making a link non-link when on the page. mcdanielnc89 Web Page Design 1 Nov 16th, 2007 08:05
positioning of my logo - link inside danny322 Web Page Design 4 Nov 7th, 2007 10:19
[SOLVED] Link Color and problem with Image positioning! Ed Web Page Design 33 Oct 10th, 2007 11:17
Positioning an image with a link pregnantNproud Web Page Design 8 Aug 12th, 2007 01:33


All times are GMT. The time now is 18:32.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43