navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

CSS or java script? advice please

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> CSS or java script? advice please
Page: [1]
 
pong

 

Posts: 44
Joined: 3/24/2004
Status: offline

 
CSS or java script? advice please - 4/21/2004 10:32:26   
I'm trying to figure out what to use: java script or CSS. I've used CSS for some basic rollover stuff but now have run into something more complex.
Attached is the screen grab of my layout. The words in the squares will be rollover links. The triangles would show up when the user rollsover them. (you see all the triangles but that would never actually happen - just wanted to show you where they will all be - note they're allover the place ie. to the left, above etc. ).
Question: How should i do these link rollovers? CSS or java script
1. I tried CSS, having the triangles as graphics but I couldn't get them to work. The layout is very important here and things have to stay centered and they just didn't stay centered. suggestions? also worried about browser compatibility.
2. If i use Java sript , the square boxes with the linked text will all be images. Much easier but it will mean mostly everything on the page will be images and java, potentially concern (?) for the people who have java script turned off. I guess i could put also put the links as css on the bottom with footer.

Basically i'm trying to weigh the pros and cons for each and need some fresh ideas and eyes.
Can anyone see another way of approaching it? I"m new at CSS so maybe i'm over looking something.
Thanks


Thumbnail Image
:)

Attachment (1)
c1sissy

 

Posts: 5084
Joined: 7/20/2002
From: NJ
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 10:40:58   
Hi pong, if you post your your code and your styles, maybe someone can see how you have things set up.

I'm not familar with Javascript, so I wont' be able to help you out there, but I know that there are members that do know and would be able to help you out on t his part of your question.

_____________________________

Deb-aka-c4Ksissy
high panjandurum and alpha female of the silverback tribe
As decreed by Jesper 5-24-2003.
The only stupid question is... the one that is never asked!!
http://directory.css-styling.com
http://fmsforum.com
http://positioniseverything.net/
http://www.tanfa.co.uk/

(in reply to pong)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 10:55:52   
Lemme play with this, if I get the time, I'll come back with the solution, if someone else doesn't before hand

Dan

_____________________________




(in reply to c1sissy)
pong

 

Posts: 44
Joined: 3/24/2004
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 10:59:05   
Here is a url of something i have up. (i actually have it posted it up on another thread but this is now a different question - but i'm not sure what the forum etiquette is but i'm presuming i should start another thread)

In this url the blank grey squares will have the text link as shown in the attachement in my first post but the layout of code is the same.

http://home.earthlink.net/~pongping/aes/index.htm

Here is the style sheet code: This is the style sheet that has my attempt to use css for the links in the squares but it didn't work, the text wouldn't stay centered, part of the triangle was cut off , worked in Netscape but not in IE, a whole slew of problems happened, :-( , Starting to think that java scrip will be best for this problem but i thought i'd see what some new eyes would think.

/* COMMENT */
/* file name aes_style.css */


a.topmenu:link {color: #ffffff; text-decoration: none; padding-left: 15px}
a.topmenu:active {color: #ffffff; text-decoration: none}
a.topmenu:visited {color: #ffffff; text-decoration: none}
a.topmenu:hover {color: #ffffff; text-decoration: none; padding-left: 15px; background: url(images/triang_lft.gif);
background-repeat: no-repeat
}




a:link { font-size: 12px; color: #999999; text-decoration: none}

a:visited { font-size: 12px; color: #999999; text-decoration: none}


a:hover { font-size: 12px; color: #ffffff; text-decoration: none}

a:active { font-size: 12px; color: #999999; text-decoration: none}


.products {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #ffffff;
}

.text {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #999999;
}

.footer{
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #999999;
}

(in reply to c1sissy)
lilblackgirl

 

Posts: 288
Joined: 5/16/2002
From:
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 11:37:19   
I think you hit it on the head when you said pros and cons. There are going to be good and bad things about using both methods. I think both will suffice (if i understand what you are trying to do), but i think it depends on the type of traffic you expect to have. Do you think your viewers will be using compatable browsers, enabling js, on dial up or BB (more graphics will slow that down and eventually drive away viewers). If you are looking for a good js, let me know, i found a great, very small and very basic, script for image replacement that i like to use.

_____________________________

You look like you're about to do something stupid. I'm in.

(in reply to pong)
gorilla

 

Posts: 2974
From: Denmark
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 12:42:07   
All you have to do is to declare the image as a bg (norepeat) for the hover state of the pseudo element.

_____________________________

Mháircaish

Signature self-censored to protect the sensibilities of the thin-skinned :).

May we never confuse honest dissent with disloyal subversion. – Dwight D. Eisenhower



(in reply to lilblackgirl)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 12:57:09   
You can also add "background-position: center center;" and see if that helps to keep them in the middle...

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to gorilla)
pong

 

Posts: 44
Joined: 3/24/2004
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 17:46:36   
Thanks everyone for the suggestions.
I tried the gorila's suggestion but it still was not centered, actually i think the code did what it was supposed to do but when the link is not rolled over it looks off centered 'cause you can't see the rollover graphic.

anyhoo for now i used java script but will try some other css if something else comes up.

I haven't tried Bobby's suggestion so later tongith will try that.
Lilblackgirl: whats the code you have? i copied some DW code but if there some smaller amount of code - i'm all ears.

Thanks

(in reply to bobby)
gorilla

 

Posts: 2974
From: Denmark
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 18:28:57   
You don't believe in making life easy for yourself do you? :)


Lovely design, very lovely design in fact. I'll do a "save page" @ the weekend when I hope I have an hour or two free and see what I can come up with for you? Alternatively feel free to email me. I do eventually get around to replying but it can take a while because I'm rarely in the country at the moment let alone sitting down anywhere.

Gorgeous design, and very clear - I'm really impressed. Not something I often say btw, are you new to all of this or just to Outfront?

BTW you need to put in a FULL doctype. If you don't you are forcing IE into quirks mode and the broken box model. See what putting in a full doctype does.

< Message edited by gorilla -- 4/21/2004 19:14:32 >


_____________________________

Mháircaish

Signature self-censored to protect the sensibilities of the thin-skinned :).

May we never confuse honest dissent with disloyal subversion. – Dwight D. Eisenhower



(in reply to pong)
pong

 

Posts: 44
Joined: 3/24/2004
Status: offline

 
RE: CSS or java script? advice please - 4/21/2004 22:18:49   
thank you Gorilla!

I am a graphic designer but new to Oufront and pretty new to coding websites, done some in the past but never really learned the code, so now i'm trying to once again. code drives me nuts but Outfront is a great resource though!

I put in the Doctype, thanks for pointing that out, i didn't realize how important it was. I was hoping it might solve some of the shifting problems i had with my tables in IE but it doesn't. Even though the 2 pages i have online look like they have the same layout, thus the same code in fact i had to tweak the code in one so they would looked the same. you'd think that just saving a page under a different name and adding some different content wouldn't change the layout but it did.
thanks again!:)

(in reply to gorilla)
gorilla

 

Posts: 2974
From: Denmark
Status: offline

 
RE: CSS or java script? advice please - 4/25/2004 12:38:33   
Whooo - tried a few things including the Nicholl's shift method. IE didn't like it at all. The results were - unpleasant.

I'll mess around some more but for the moment though I hate to say it I think javascript is the way to go for cross browser purposes.

3 "%&dy pixels sheeesh ..........

_____________________________

Mháircaish

Signature self-censored to protect the sensibilities of the thin-skinned :).

May we never confuse honest dissent with disloyal subversion. – Dwight D. Eisenhower



(in reply to pong)
pong

 

Posts: 44
Joined: 3/24/2004
Status: offline

 
RE: CSS or java script? advice please - 4/26/2004 8:44:36   
Thank you Gorialla for giving it a try. I really appreciate it. From what i'm reading in outfront you're a guru with this CSS stuff!
I'll stick to Javascript for this portion of the site.
Thanks!

(in reply to gorilla)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> CSS or java script? advice please
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts