Forums

This topic is locked

Jump Menus on a pc: Defining width!!

Posted 21 Jul 2004 11:13:25
1
has voted
21 Jul 2004 11:13:25 darren smith posted:
Jump Menus on a pc: Defining width!!

The following works on a mac but a PC restricts width. Looking for a CSS hack if possible. Here is the code

-------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<form name="title_jump">

<select name="menu1" class="text" style="width: 180px;" onChange="MM_jumpMenu('parent',this,0)">
<option selected>All Digital Photography Tiles:</option>
<option value="www.ilex-press.com/1_digi_photo/xmfxd/XMFXD_BOOK.html">Michael Freeman Digital Photography Expert: Close-up Photography </option>
<option value="www.ilex-press.com/1_digi_photo/xmfxl/XMFXL_BOOK.html">Michael Freeman Digital Photography Expert: Light and Lighting</option>
<option value="www.ilex-press.com/1_digi_photo/xmfxp/XMFXP_BOOK.html">Michael Freeman Digital Photography Expert: Photographing People</option>
<option value="www.ilex-press.com/1_digi_photo/xmfxo/XMFXO_BOOK.html">Michael Freeman Digital Photography Expert: Landscape and Nature</option>
<option value="www.ilex-press.com/1_digi_photo/xssla/XSSLA_BOOK.html">Step by Step Digital Landscape Photography</option>
<option value="www.ilex-press.com/1_digi_photo/xssnu/XSSNU_BOOK.html">Step by Step Digital Nude Photography</option>
<option value="www.ilex-press.com/1_digi_photo/xsspo/XSSPO_BOOK.html">Step by Step Digital Family Photography</option>
<option value="www.ilex-press.com/1_digi_photo/xssre/XSSRE_BOOK.html">Step by Step Digital Photo Retouching</option>
<option value="www.ilex-press.com/1_digi_photo/xelem/XELEM_BOOK.html">Digital Photographer's Guide to Photoshop Elements</option>
<option value="www.ilex-press.com/1_digi_photo/xseed/XSEED_BOOK.html">Secrets of the Digital Darkroom</option>
<option value="www.ilex-press.com/1_digi_photo/xsnap/XSNAP_BOOK.html">Perfect Digital Photos in a Snap</option>
</select>
</form>
</body>
</html>

Thanks in advance

Replies

Replied 21 Jul 2004 15:41:33
21 Jul 2004 15:41:33 Simon Martin replied:
Just define the width for the select box in CSS and not as an inline style
works a treat

Sharing knowledge saves valuable time!

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 21 Jul 2004 15:50:40
21 Jul 2004 15:50:40 darren smith replied:
thanks for the reply simon

does not work i am afraid! OK on MAc again not on a PC
Replied 21 Jul 2004 15:56:56
21 Jul 2004 15:56:56 Dave Thomas replied:
what do you mean?

you mean the select box, or the actual drop down box?

giving the 'select' tag some properties in a css style does change the width to 180px on a pc.
but it doesnt change your drop-down as the text is much larger. is this what you mean?

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]
Replied 21 Jul 2004 16:08:10
21 Jul 2004 16:08:10 darren smith replied:
hi davesw

it sets the select box to the width and works fine.

It should not change the drop down width as its wider....but it crops it to the same width so long titles are unreadable!

Replied 21 Jul 2004 16:15:42
21 Jul 2004 16:15:42 darren smith replied:
sorry ganseki / UltraDav

called you both simon...getting mixed up with another forum!!!

Replied 21 Jul 2004 16:19:16
21 Jul 2004 16:19:16 Simon Martin replied:
The select box will stretch to accomodate any value that it needs to display - unless you've defined it otherwise e.g. in your CSS for aesthetic reasons
either keep your options short enough to fit then you can have your select boxes the same length as the input boxes and everything looks smart and tidy; else don't set the length on the select box at all and it will do its own thing

Sharing knowledge saves valuable time!

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 21 Jul 2004 16:22:09
21 Jul 2004 16:22:09 Simon Martin replied:
ahh a quick re-read of the topic later...
Do you mean that you want the box a fixed width and the bit that 'drops down' to be a variable size depending on what's in it?
I've seen that elsewhere - but my previous posts wont make the change you want. I'm not sure how to achieve that.

Sorry

Sharing knowledge saves valuable time!

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 21 Jul 2004 16:31:15
21 Jul 2004 16:31:15 darren smith replied:
hi ganseki


you got it...

sorry explaination bad...getting reallly frustrated with this. It looks as if IE on a PC has real problems with Css2.

Did see something about box model hack and setting max-widths but not sure how it works!!!!!!!!

thanks anyway
Replied 21 Jul 2004 16:34:59
21 Jul 2004 16:34:59 Dave Thomas replied:
this in internet explorer by any chance?

it works exactly how you want it to in Mozilla firefox and Opera. Sets the width but you still get the long titles.

and as we all know IE isn't very good when it comes to keeping up with the pace.

you posted this in any css forums?

Regards,
Dave

Edit::

so it is on IE.

well the box model hack is only really for div / box size placing i think, although it's worth having a look.

www.tantek.com/CSS/Examples/boxmodelhack.html

[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]


Edited by - UltraDav on 21 Jul 2004 16:38:35
Replied 21 Jul 2004 16:38:09
21 Jul 2004 16:38:09 Simon Martin replied:
www.bluerobot.com has some useful links on CSS and the box hack

HTH

Sharing knowledge saves valuable time!

Simon

[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 21 Jul 2004 16:38:43
21 Jul 2004 16:38:43 darren smith replied:
hi ultradav

yes IE on a PC.

fine on a mac IE and Safari - think CSS3 compatible?!

www.csscreator.com/css-forum/forum10.html

Waiting for replies so far. think it may have to be a show / hide layer job. Wanted to keep navigation consistant though......never mind.

Any bright ideas please post

cheers
Replied 21 Jul 2004 16:49:01
21 Jul 2004 16:49:01 Dave Thomas replied:
well considering the links you have can be grouped, how about having a horizontal div, with 3 sections

Michael Freeman - Digital Photography Expert | Step - by - Step | Guides & Tutorials

then a little sub-menu on each sections page.

would look better i think.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[SQL]|[Access2000]|[ASP/VBScript]|[XP-Pro]

Reply to this topic