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.
|
|
|
|
|
![]() |
||
how do i extend the background on a span
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
|
|||
|
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 |
|
|||
|
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.
|
![]() |
| Tags |
| background, span |
| Thread Tools | |
|
|
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 |