1
xueming
Style.css make Javascript Table style not working
  • 2005/7/14 19:41

  • xueming

  • Not too shy to talk

  • Posts: 127

  • Since: 2005/2/7 6


All,

I have created a drop down menu using one of the DHTML menu builder. But it doesn't work as expected since the style.css of XOOPS theme define table width as 100%. But in Javascript, it doesn't want table width as 100%

Is there a way to overwrite the style.css?
Or any other suggestion?

Thanks

2
pegasus00321
Re: Style.css make Javascript Table style not working

Just change the style.css for your theme in XOOPS_ROOT Folder/ themes/{theme}/styleXX.css
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc

3
xueming
Re: Style.css make Javascript Table style not working
  • 2005/7/14 20:48

  • xueming

  • Not too shy to talk

  • Posts: 127

  • Since: 2005/2/7 6


Thanks. But I want to keep it, so my XOOPS theme will work properly.

Here is the code in Javascript, Is there a way to unset the table width defined in the style.css from this script?

"<TABLE STYLE='border:none;padding:0px' CELLPADDING=0 CELLSPACING=0 ALIGN="+m.maln+">

4
ackbarr
Re: Style.css make Javascript Table style not working

This should do the trick
"<TABLE STYLE='border:none;padding:0px;[color=008000][b]width:auto;[/b][/color]' CELLPADDING=0 CELLSPACING=0 ALIGN="+m.maln+">
Site Hosting - PlanetXoops

5
xueming
Re: Style.css make Javascript Table style not working
  • 2005/7/14 21:53

  • xueming

  • Not too shy to talk

  • Posts: 127

  • Since: 2005/2/7 6


Thanks! That's a great idea, but it still not working.

Actually, I am start to wonder if this "STYLE" tag or any other atributes in the javascrip can actually overwrite anything already defined in the style sheet. The reason is that I have also tried to change some other values like "padding" in this script, but it doesn't seem to have any effect at all.

6
frankblack
Re: Style.css make Javascript Table style not working
  • 2005/7/14 23:18

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Why not add a css-class to the table and define the class in style.css? That should do the trick!

7
xueming
Re: Style.css make Javascript Table style not working
  • 2005/7/16 3:30

  • xueming

  • Not too shy to talk

  • Posts: 127

  • Since: 2005/2/7 6


Thank you all for your help !!! Now it is works !!

Two ways to make it work:

1. Define a class in style.css works graet as frankblack suggested

2. The reason that "width:auto" not working is because the Javascript itself also define a class. So I add this "width:auto" to that class, and then everything works.

Thanks again!

8
macnight
Re: Style.css make Javascript Table style not working
  • 2005/8/3 9:40

  • macnight

  • Just popping in

  • Posts: 1

  • Since: 2005/8/3 9


I'm glad you got it working. I am running into nearly the same exact problem with Sothink DHTMLMenu. Can you describe in as much detail as you are able, what you did to fix the problem.

I have an okay grasp of css but just can't get myslef around this problem. The js file that Sothink generates is a mess with table tags all over the place. So i don't know where to even start.

Thank you,
Mac

Login

Who's Online

162 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits