TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

CSS and Link styles

Page: 1 Reply
Sep 1st 2004#159461 Report
Member since: Jun 2nd 2004
Posts: 124
I've encountered a problem. I bet most of you is known with styling
up you're links with hovers etc. Now I have one site, I use php and
switch id code. When I get the newsscript on my mainpage, that page
will use the css styles of the index.php file it's inlcuded in.

Is there any possibility to make two different link css styles in one document?
I need to have another link color in the newsscript than in the index.php files.
Help??
Reply with Quote Reply
Sep 1st 2004#159462 Report
Member since: Apr 20th 2002
Posts: 3000
a.class1:link { /* style for one set of links */ }
a.class2:link { /* style for second set of links */ }

then call it by <a href="uri" class="class1>link</a>, <a href="uri2" class="class2">link</a>

deker might have a better solution.
Reply with Quote Reply
Sep 1st 2004#159463 Report
Member since: Jun 2nd 2004
Posts: 124
Ah thanks mate!

Anyhow, I know there's a code for removing the horizontal scrollbar.
Anyone have it? I knew it before but got forgotten over the years :P

I have a deadline on a webdesign job tomorrow, my minds just stop working :P
Reply with Quote Reply
Sep 1st 2004#159472 Report
Member since: Mar 18th 2001
Posts: 6632
Another better way to do it is like this:

< div id="newsbox">< a href="yoursite.com">Link< /a>< /div>

Then in your CSS you'd have:

#newsbox a {
definitions here
}

If you aren't using a div for the news box, you could just put a class on a table or table cell. At least this way there would only be one class, instead of one for each link.

The advantage of this method is that you don't have to put class="news" on every single link in the news section, which wastes a ton of code and bandwidth.
Reply with Quote Reply
Sep 2nd 2004#159515 Report
Member since: Jun 2nd 2004
Posts: 124
Thanks deker!
Any solutions on the horizontal scroller?
Reply with Quote Reply
Sep 2nd 2004#159527 Report
Member since: Mar 18th 2001
Posts: 6632
No, I don't like messing with people's browsers.
Reply with Quote Reply
Sep 2nd 2004#159528 Report
Member since: Jun 2nd 2004
Posts: 124
:P

The thing is in a div window, and it makes a horizontal scroller even tho it doesn't need to
'
Reply with Quote Reply
Sep 2nd 2004#159531 Report
Member since: Jun 2nd 2004
Posts: 124
I found it, but it was useless since it didn't work in Mozilla/Opera
Reply with Quote Reply
Oct 1st 2004#160919 Report
Member since: Feb 7th 2002
Posts: 1564
Just from the top of my head... The Overflow attribute ??? Could that be something for you ?

P
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum