how do i extend the background on a span

This is a discussion on "how do i extend the background on a span" within the Starting Out section. This forum, and the thread "how do i extend the background on a span 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 May 27th, 2007, 12:18
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
how do i extend the background on a span

Hi, I'm in the process of creating a community website at www.cantley.org.

I have an area to the left of the page where I have my primary links which has a border around it. The links are styled by use of spans but I wanted the background of the current page link to fill the space either side but within the confines of the of the border. I achieved this by giving the element a value of display:block but to overcome the line break i put margin-bottom:-.9em. I know i should probably be run out of town for such bodging but my question is... how can i achieve my desired background effect the the correct way. If I just use span the background is only as wide as the text.

This is my first time so please be kind, especially if you view the crash site that passes for my css file.


Many thanks
Reply With Quote

  #2 (permalink)  
Old May 27th, 2007, 18:37
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how do i extend the background on a span

To do this you would want to use unordered lists <ul></ul>

Check out this page, http://cssplay.co.uk/menus/index.html they have an extensive list of menus from easy to complex. This will help you set up a correct navigation with css.

Site looks good so far.. Your next goal after the navigation will be to use <p> with bottom margins so you can get rid of the </br>

Enjoy the forumz!!

Last edited by Lchad; May 27th, 2007 at 19:50. Reason: typo
Reply With Quote
  #3 (permalink)  
Old May 27th, 2007, 19:11
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how do i extend the background on a span

Thanks for the link and advice Lchad. Wow that site looks like a great resource for links. Appreciate the tip on the <p> with margin. This is my first day on webforumz, so much interesting stuff.
Reply With Quote
  #4 (permalink)  
Old May 27th, 2007, 19:46
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: how do i extend the background on a span

Yeah that is a nice link...as you say Linda, bookmarked for a rainy day...lol.
Reply With Quote
  #5 (permalink)  
Old May 27th, 2007, 19:51
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how do i extend the background on a span

You're welcome.. The hard part will be selecting the menu you want now! Too many to choose from!
Reply With Quote
Reply

Tags
background, span

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
Can <span></span> tags have position relative? Oak Web Page Design 13 Mar 9th, 2008 17:04
<SPAN> help Access JavaScript Forum 2 Nov 3rd, 2007 18:13
Div and Span tags... jjgamepro17 Web Page Design 4 Nov 7th, 2006 19:22
Span questions maxelcat Web Page Design 2 Aug 7th, 2006 11:07
Wrapping by span hessodreamy Web Page Design 3 Sep 14th, 2005 07:34


All times are GMT. The time now is 06:41.


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