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.
|
|
|
|
|
![]() |
||
% width buttons problem - help please!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
% 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 |
|
|
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
Re: % width buttons problem - help please!
Ok.. why not make the border which is a graphic the background of the div?
|
|
|||
|
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 |
|
|||
|
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! |
![]() |
| Tags |
| width, css, liquid |
| Thread Tools | |
|
|
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 |