473,323 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

ot - CSS Table Widths

Hi all

First let me apologize for writing in this news group as its the only
main one I read.

I got a CSS style

..SetButton {width: 100px; background:url(mybackbutton.gif)}

now I got a table with each TD with the above class
<TABLE><TR>
<TD CLASS=SetButton>Button1
<TD CLASS=SetButton>Button2
<TD CLASS=SetButton>Button3
<TD CLASS=SetButton>Button4
<TD CLASS=SetButton>Button5
</TABLE>
it works great in IE the table is set to 500 px (100x5) and stays 500
px even when the browser width <500 px

now I also got NS 7 and test it on there

problem is:

when NS browser width <500 then it starts shrinking the table till the
text fits before it puts its bottom horizontal scroll bar on.

Now I could put a 100x1 pixel image in each cell but I dont want to do
this as the width can be variable in above style. ( the width is wrote
out by my ASP vbscript code for differnt things.

thanks for any help in advance

Al
Jul 19 '05 #1
4 1822
> Why can't the width of the image be variable? Never underestimate the
value
of a 1x1 clear .gif:

<IMG SRC="clear.gif" HEIGHT="1" WIDTH="<%=imgWidth%>">


Or, to prevent it from showing (e.g. if images are disabled and/or outlines
are on), modify the hspace / vspace parameters instead of the width /
height.
Jul 19 '05 #2
CJM
I'm 100% on what the problem is/what you are trying to do, but if you want a
proper CSS solution to this you ought to post a link so we can see the page
in action.

CJM

"Harag" <ha***@softhome.net> wrote in message
news:ve********************************@4ax.com...
Hi all

First let me apologize for writing in this news group as its the only
main one I read.

I got a CSS style

.SetButton {width: 100px; background:url(mybackbutton.gif)}

now I got a table with each TD with the above class
<TABLE><TR>
<TD CLASS=SetButton>Button1
<TD CLASS=SetButton>Button2
<TD CLASS=SetButton>Button3
<TD CLASS=SetButton>Button4
<TD CLASS=SetButton>Button5
</TABLE>
it works great in IE the table is set to 500 px (100x5) and stays 500
px even when the browser width <500 px

now I also got NS 7 and test it on there

problem is:

when NS browser width <500 then it starts shrinking the table till the
text fits before it puts its bottom horizontal scroll bar on.

Now I could put a 100x1 pixel image in each cell but I dont want to do
this as the width can be variable in above style. ( the width is wrote
out by my ASP vbscript code for differnt things.

thanks for any help in advance

Al

Jul 19 '05 #3
Thanks guys for replying but the 2 ideas you said I already thought of
and dismissed. let me explain a bit more.
I got a vbscript class that will generate html code in a table either
vertical or horizontal and in each cell it creates buttons.

now I tell the class what "style" to make these buttons so when it
creates the menu of buttons it uses the "style" for the class.

eg
<TR>
<TD ID=MainMenu_1 CLASS=MenuStyle_1_OFF onmouseover="togglemenu(this)"
onmouseout="offmenu(this)" onclick="location="file.asp">Button
Text1</TD>
<TD ID=MainMenu_2 CLASS=MenuStyle_1_OFF onmouseover="togglemenu(this)"
onmouseout="offmenu(this)" onclick="location="file.asp">Button
Text2</TD>
<TD ID=MainMenu_3 CLASS=MenuStyle_1_OFF onmouseover="togglemenu(this)"
onmouseout="offmenu(this)" onclick="location="file.asp">Button
Text3</TD>

the above is created from my asp vbscript class when i put
"clsMenu.display"

now the togglemenu code is as you might guess javascript this goes
through all the elements with the same ID (ignoring the number) and
basically turns the class of the element to the same name but adds
_OFF on the end. Then when its done that the current element ("this")
classname = the same class but with the word _ON at the end instead of
"_OFF"

the end result is that it produces 3 highlighting buttons as you move
your mouse over and only uses 2 "blank" images (rather than 6 (2 for
each button))

in my css I have 2 styles for each "look" i want one for OFF and one
for ON and thats where the "WIDTH" & "HEIGHT" is stored as well as
text color/size/weight/font etc

So really the only thing I can think of on making NS keep the cells at
the requested width was to use the width:100px; in the css but as said
before when NS browser is < width of all the buttons (due to user
resizing)

thanks for any more help.

Al
Jul 19 '05 #4
Harag wrote on 07 aug 2003 in microsoft.public.inetserver.asp.general:
First let me apologize for writing in this news group as its the only
main one I read.


Please keep on topic.

The best css NG is:

netscape.public.dev.css

Always accessable via:

<http://groups.google.com/groups?q=netscape.public.dev.css>

More quit is:

microsoft.public.siteserver.css

<http://groups.google.com/groups?q=microsoft.public.siteserver.css>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Raaijmakers, Vincent (IndSys, GE Interlogix) | last post by:
Ok, perhaps a question on a newbie level. I try to create a simple 'write to a console application' where all the items in a string do have a variable size: items = Well, actually, I need to...
4
by: Bart Heinsius | last post by:
Hi, I can't get my cell widths fixed in a table in IE6. In Mozilla it works, see http://www.xs4all.nl/~margreeh/aa.html . It's the blue cells that remain fixed at 20pt widths in Mozilla but not...
3
by: Steve Sabljak | last post by:
I seem to having a little trouble getting a table to display correctly in both msie and firefox. I want to set the table and column widths in pixels, and have some cell padding too. The table...
0
by: TJ Talluto | last post by:
<facts> I have a "month calendar" that always displays exactly 42 days... and alongside is a vertical box that displays the detail (form fields) of any particular select event that appears on the...
4
by: N. Demos | last post by:
The following code renders as intended in IE (A TABLE, with cells of fixed width and height, inside of a DIV with fixed width and height and overflow set to hidden.) In Firefox, the table cells...
2
by: Andy Flash | last post by:
Hi. I'd like a little help working out what is going on with what should be a simple alignment problem. I have an outer table with a <td> which has an inner table. The <td> specified as...
25
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
18
by: chimalus | last post by:
I am using a table with no column widths specified, letting the table layout manager do its thing for figuring out the column widths, and this works just fine. Now I want to make the table...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
6
Markus
by: Markus | last post by:
Ello. I'm trying to set the widths for my first three rows of cells and then have a bottom row with different cell widths. However, the first three rows take on the same widths as the bottom row. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.