[SOLVED] css menu width issue

This is a discussion on "[SOLVED] css menu width issue" within the Web Page Design section. This forum, and the thread "[SOLVED] css menu width issue are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 19th, 2007, 13:22
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] css menu width issue

Hi everyone.

Could somebody have a look at my menu that i have done in css....

http://www.design365.co.uk/sef/home.htm

The image im using for the rollovers is 115 pixels wide but i dont understand why its not displaying the whole image. Any help would be appreciated.

Thanks
Reply With Quote

  #2 (permalink)  
Old Nov 19th, 2007, 13:35
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

add a display: block;

also ... instead of using 2 images, use only one and change it with the background-position property ... see this tutorial from the Creative Coding newsletter

CSS Hover Effects
Reply With Quote
  #3 (permalink)  
Old Nov 20th, 2007, 08:53
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

Hi Karinne, thanks for the tutorial its working ok.....

http://www.design365.co.uk/sef/home.htm theres just 2 things...

1. How do i position the text alongside the red square?

2. How do i push the whole menu left so its more centralised?

Thankyou
Reply With Quote
  #4 (permalink)  
Old Nov 20th, 2007, 09:13
Up'n'Coming Member
Join Date: Oct 2007
Location: 'HD' - Soon to be 'FY' home. ;)
Age: 32
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

Use this CSS code

#banner_middle {
width:746px;
margin:auto;
}

to align the banner to the middle of the screen so it flows with the container below.

Aligning the text to be at the right of the square is a little more complicated.
You need to look into 'line height' to vertically align the text and add some left padding to the 'li' to push it across.

Last edited by Nortus; Nov 20th, 2007 at 09:20.
Reply With Quote
  #5 (permalink)  
Old Nov 20th, 2007, 09:40
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

Hi Nortus, thanks for the advice but i want the banner to go all across. I just need to put the text in the right place in the buttons and move them all across.
Reply With Quote
  #6 (permalink)  
Old Nov 21st, 2007, 13:26
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

Link doesn't work anymore.
Reply With Quote
  #7 (permalink)  
Old Nov 22nd, 2007, 11:10
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

Hi karrine.

Sorry new link....

http://www.design365.co.uk/sef/home.html

How do i position the text? Nothing seems to be working for me lol
Reply With Quote
  #8 (permalink)  
Old Nov 22nd, 2007, 12:49
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

is anybody able to help? ive tried padding, margin, text align etc but the text isnt moving
Reply With Quote
  #9 (permalink)  
Old Nov 22nd, 2007, 13:03
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

Make these changes

Code: Select all
ul#nav li a {

color: #ffffff;

font-size: x-small;

font-weight: bold;

font-family: arial;

width:95px;

height:23px;

padding 8px 0 0 25px;

display:block;

text-decoration:none;

background: url(images/button.gif) no-repeat 0 0;

}
Reply With Quote
  #10 (permalink)  
Old Nov 22nd, 2007, 13:13
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css menu width issue

Thanks Karinne your a life saver, yet again!
Reply With Quote
Reply

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
Menu issue mcdanielnc89 Web Page Design 5 Feb 12th, 2008 07:06
Drop down menu issue Richowls JavaScript Forum 1 Sep 17th, 2007 12:00
width problem, menu appears 'squashed' @lun Web Page Design 4 Nov 18th, 2006 11:56
Dropdown Menu Issue greenphoenix Web Page Design 2 Aug 22nd, 2006 20:17
menu/list width question swiftmed Web Page Design 3 May 19th, 2006 13:05


All times are GMT. The time now is 02:55.


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