Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #2  
Old July 19th, 2005, 07:28 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: ot - CSS Table Widths

> Why can't the width of the image be variable? Never underestimate the
value[color=blue]
> of a 1x1 clear .gif:
>
> <IMG SRC="clear.gif" HEIGHT="1" WIDTH="<%=imgWidth%>">[/color]

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.


  #3  
Old July 19th, 2005, 07:29 AM
CJM
Guest
 
Posts: n/a
Default Re: ot - CSS Table Widths

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" <harag@softhome.net> wrote in message
news:ve25jv0l66niob295l1pviosvtib3oc9il@4ax.com...[color=blue]
> 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[/color]


  #4  
Old July 19th, 2005, 07:29 AM
Harag
Guest
 
Posts: n/a
Default Re: ot - CSS Table Widths

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
  #5  
Old July 19th, 2005, 07:29 AM
Evertjan.
Guest
 
Posts: n/a
Default Re: ot - CSS Table Widths

Harag wrote on 07 aug 2003 in microsoft.public.inetserver.asp.general:[color=blue]
> First let me apologize for writing in this news group as its the only
> main one I read.[/color]

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)
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.