Return to iWEBTOOL

Go Back   iWEBTOOL Talk > The Web and your Website > Programming > HTML
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
Welcome to iWEBTOOL Talk, where you talk about webmaster-related stuff.
 
Discuss topics which interest you.
With over thousands of threads (topics), we're sure you'll find something that'll interest you.
Ask for help whenever you need it.
We have thousands of members who are available to help you if you need it.
It's absolutely FREE!

 1  Register           2  Browse the board           3  Discuss whatever may interest you!
 


Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 03-08-2006, 12:16 AM   #1
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Lightbulb Slightly advanced CSS...

Hey all,

I need to know how to set certain things for certain... thanks

1. I need to have a background color (on hover) and 2px padding (always) on TEXT links. ONLY text links.

2. I need to NOT have any border or background color (even on hover) for any images and inputs.

Basically, I'm trying to restrict the padding and background color (on hover) to ONLY text links with CSS.

Any bright ideas? Thanks ^_^

-Matt
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
SEO Checklist
Get yourself better ranking with
our "Do-it-Yourself" SEO Checklist.
Click Here
Old 03-08-2006, 09:30 AM   #2
rohan2kool
Member
 
rohan2kool's Avatar
 
Join Date: Dec 2005
Posts: 132
rohan2kool will become famous soon enough
Default Re: Slightly advanced CSS...

i hope this helps:

Code:
<style type="text/css"> a span { padding: 2px; } a span:hover { background-color: #FCFCC8; } input { background: none; border: none; } img { background: none; border: none; } </style>

At the same time you are required to have text links within <span></span> tags or extend it to further tags. The fact that you can use images within span tags is a problem but there's no workaround to it as CSS doesn't distinguish between text, images and lists as such.
__________________
Eat healthy, Stay Fit, Die Anyway.
--==--
If there is a man who knows everything about women, there is a Windows distribution without bugs.
rohan2kool is offline  
Old 03-09-2006, 02:41 AM   #3
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Slightly advanced CSS...

Ah thanks, I'll definately try that. I can't now but will ASAP And let you know if it worked. Rep added
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
Old 03-12-2006, 09:25 PM   #4
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Slightly advanced CSS...

I can't get it to work Is there like a way to say:

a img { whatever }

So that it only affects images in anchors?
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
Old 03-13-2006, 02:14 PM   #5
rohan2kool
Member
 
rohan2kool's Avatar
 
Join Date: Dec 2005
Posts: 132
rohan2kool will become famous soon enough
Default Re: Slightly advanced CSS...

yep.. you can do that.
__________________
Eat healthy, Stay Fit, Die Anyway.
--==--
If there is a man who knows everything about women, there is a Windows distribution without bugs.
rohan2kool is offline  
Old 03-13-2006, 09:18 PM   #6
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Slightly advanced CSS...

Then how come it doesn't work?
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
Old 03-14-2006, 11:13 AM   #7
rohan2kool
Member
 
rohan2kool's Avatar
 
Join Date: Dec 2005
Posts: 132
rohan2kool will become famous soon enough
Default Re: Slightly advanced CSS...

Please post the complete code here. Maybe I can catch the glitch in there. I really don't know why it's not working...
__________________
Eat healthy, Stay Fit, Die Anyway.
--==--
If there is a man who knows everything about women, there is a Windows distribution without bugs.
rohan2kool is offline  
Old 03-15-2006, 09:34 PM   #8
Zack
Junior Guru
 
Zack's Avatar
 
Join Date: Dec 2005
Location: North Carolina
Posts: 759
Zack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to behold
Send a message via MSN to Zack
Default Re: Slightly advanced CSS...

No a img {, will not work. Try the following -
HTML Code:
img { border: 0; } a, a:visited, a:active { color: your color; text-decoration: underline; } a:hover { color: your color; background: your background; text-decoration: underline;

If the img isn't working, put this in your image tags:
HTML Code:
<img src="picture.png" border="0" />

HTMLGuy
__________________
yaxal releases '07
Zack is offline  
Old 03-21-2006, 02:48 AM   #9
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Slightly advanced CSS...

Hm, didn't work Thanks though!
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
Old 05-27-2006, 01:07 PM   #10
Zack
Junior Guru
 
Zack's Avatar
 
Join Date: Dec 2005
Location: North Carolina
Posts: 759
Zack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to behold
Send a message via MSN to Zack
Default Re: Slightly advanced CSS...

Oh, here comes a long post but it will help you a lot! Okay in CSS there is a thing called classes. You can create classes so only certain things are changed. Classes basically seperates normal tags (the ones you do not want to change) and the tags you want to change. In this case you want to change the look of images that have a hyperlink attached to them. You don't want other images to look any different. So let's create a css class! Here is what you want, I will explain it for you (put this in your stylesheet).
Code:
img.aimg { border: 0; /*any other tags*/ }
Okay this sets up the image class aimg. Basically all I did was take out the border, you can add other explanations (i just said tags there). Now, to apply a class to an image, you go to it's code and add the following.
Code:
<a href="#" target="_blank"><img src="images/image.png" class="aimg" /></a>
That should work, and you can change all of their class styles at any time you want, so it is really effective and should help you a bunch. Sorry it took me so long to remember this.
HTMLGuy
__________________
yaxal releases '07
Zack is offline  
Old 05-27-2006, 01:49 PM   #11
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Slightly advanced CSS...

Thanks for this; I already know how to use classes But other members will find it useful, I'm sure.
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
Old 05-28-2006, 02:09 PM   #12
Albert Tai
Permanently Banned
 Contributor 
 
Albert Tai's Avatar
 
Join Date: Apr 2006
Location: Ontario, Canada
Posts: 1,010
Albert Tai is a jewel in the roughAlbert Tai is a jewel in the roughAlbert Tai is a jewel in the roughAlbert Tai is a jewel in the rough
Send a message via MSN to Albert Tai Send a message via Yahoo to Albert Tai
Default Re: Slightly advanced CSS...

uh i knew that a long time. Hey compuxp what are you going to do with that script. What website are you going to put on? I want to see and rate it...please
__________________
Albert Tai
Submit your links to Webz.in

Rep people on this forum if they helped you
Albert Tai is offline  
Old 05-28-2006, 10:06 PM   #13
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Slightly advanced CSS...

Me? With what script?
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
Old 05-28-2006, 10:11 PM   #14
Zack
Junior Guru
 
Zack's Avatar
 
Join Date: Dec 2005
Location: North Carolina
Posts: 759
Zack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to beholdZack is a splendid one to behold
Send a message via MSN to Zack
Default Re: Slightly advanced CSS...

I think he means, what are you building, and in compuXP's defense, you can't ask him.
HTMLGuy
__________________
yaxal releases '07
Zack is offline  
Old 05-28-2006, 10:15 PM   #15
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Slightly advanced CSS...

Actually I haven't released the project yet :-/ Going to have to wait until it's out.
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
Webmaster Tools Webmaster Tools Click Here
Closed Thread

(Threads which have no activity for more than 30 days are automatically closed.)



Quick Reply
Message:

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced CSS Zack CSS 1 10-25-2006 11:56 PM
advanced ebay mail scam UnKnown General Talk 8 10-07-2006 10:58 AM
Needed, a fairly advanced programmer Zack Want to Buy 4 12-29-2005 11:57 PM


All times are GMT. The time now is 09:46 PM.


Powered by vBulletin v3.6.7 © 2008, Jelsoft Enterprises Ltd. SEO by vBSEO © 2006, Crawlability, Inc.