% width buttons problem - help please!

This is a discussion on "% width buttons problem - help please!" within the Web Page Design section. This forum, and the thread "% width buttons problem - help please! 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 Mar 29th, 2007, 12:18
Reputable Member
Join Date: May 2006
Location: Wrexham, UK
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
% width buttons problem - help please!

Been working on an ebay shop layout but got a slight problem, I need to have some links in the form of buttons at the top of the screen underneath a header image with width at 100%, so the buttons need to align with that.

The only problem is ideally I'd like a border around the buttons and separating them (ie a box around each button), but if I set the button width to 20% and put a border on, I can't fit five across the top, and using 19.9% renders different widths in each browser and leaves a gap at the end (or will only fit 4 buttons if you decrease the resolution). Any ideas? It's gotta be liquid so can't use images either, just need to get a proper border in between the buttons.

As a last resort I may just have to use | separators and not have them as a fixed % width, but I'd like to do it this way if possible

Many thanks
Reply With Quote

  #2 (permalink)  
Old Mar 29th, 2007, 12:49
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: % width buttons problem - help please!

Haven't done anything in Ebay but will it allow you to use the 19.9% and CENTER the five links?

Last edited by Lchad; Mar 29th, 2007 at 12:50. Reason: better question
Reply With Quote
  #3 (permalink)  
Old Mar 29th, 2007, 15:07
Reputable Member
Join Date: May 2006
Location: Wrexham, UK
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
Re: % width buttons problem - help please!

Yeah but then the border still won't match up with the header image (which is a full colour). I may have to use the dreaded word....tables

If only you could set the border inside the div etc, or if all the browsers rendered %s the same I wouldn't have this problem! grrr
Reply With Quote
  #4 (permalink)  
Old Mar 29th, 2007, 15:35
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: % width buttons problem - help please!

Ok.. why not make the border which is a graphic the background of the div?
Reply With Quote
  #5 (permalink)  
Old Mar 29th, 2007, 16:36
Reputable Member
Join Date: May 2006
Location: Wrexham, UK
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
Re: % width buttons problem - help please!

Cos it has to be liquid so it wouldn't work, unless I let the background image get strecthed, but then it would look bad :S

Strange problem this one, I'll have a muck about but fear I may have to resort to tables or change the design
Reply With Quote
  #6 (permalink)  
Old Mar 29th, 2007, 16:46
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: % width buttons problem - help please!

Do you have this online somewhere? As a test page or something? I'm having a hard time visualizing this ... that's why I've been refraining from posting but then you said the dreaded "tables" word and ... well ... you know
Reply With Quote
  #7 (permalink)  
Old Mar 29th, 2007, 17:47
Reputable Member
Join Date: May 2006
Location: Wrexham, UK
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
Re: % width buttons problem - help please!

Figured out a way around it (haven't got it online at the mo, needs finishing for a client tonight).

Finally did it by setting the width of the buttons to 20% so that 5 fit along each row, then made a 2px wide gif of plain white and set it as the background image position top left and repeat y on the all the buttons except the first in the row to create my own border.

Phew hope this can help someone else out as it was giving me a major headache not being able to use borders or margins due to the width (would have been fine apart from opera doesn't allow decimal percentages) damn multiple browsers!
Reply With Quote
Reply

Tags
width, css, liquid

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
Length problem solved, now width. Manic056 Starting Out 5 Jan 31st, 2008 02:33
width problem, menu appears 'squashed' @lun Web Page Design 4 Nov 18th, 2006 11:56
Div width problem NiKnight Web Page Design 1 Oct 13th, 2006 23:24
new problem. document.getElementById().width returning unassigned. why? sanchopansa JavaScript Forum 2 Jul 22nd, 2006 20:23
js/css problem-using the width&height values obtained with js to structure my layout sanchopansa JavaScript Forum 0 Jul 21st, 2006 20:13


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


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