It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming CSS Forum

How to change how a link looks

How to change how a link looks

Postby jberry on Wed Apr 23, 2008 7:27 pm

I have a div id called #clickLeft it make a box with a boarder and has some writing in it. I want to make the whole box click able and send it to another page. But the problem I am having is that it changes the wording color. I want to keep the words the same color. how do I accomplish this.
jberry
100+ Club
 
Posts: 143
Joined: Mon Mar 19, 2007 5:40 pm
Location: Atlantic City, NJ

Postby rangana on Thu Apr 24, 2008 3:34 am

Have you placed that element inside the anchors? (<a>)???...if so,
then adding border:0; in your CSS will fix this for you ;)
~ Get me some work, I do freelancing ~
User avatar
rangana
500+ Club
 
Posts: 929
Joined: Wed Feb 27, 2008 6:14 am
Location: Cebu City Philippines

Postby sator75 on Thu Jun 19, 2008 11:37 pm

Hi everybody,

i'm having similar prb, in particular i have a jpg image inside a div tag that links to a link.
When i see my page on every browser the border of the jpg is blu.
I don't want that to happen, i'd prefer the border to remain trasparent.
I've just added the css code to set the border to 0 but it didn't work.
Does anyone know how to fix this prb?
sator75
 
Posts: 9
Joined: Sun Jun 08, 2008 6:12 pm

Postby dflynn on Fri Jun 20, 2008 1:01 am

add border="0" within the image tag.


ex.
<img src="yourimage.jpg" width="100px" height="100px" border="0">
Image
nnjoi.com - Portfolio
nnjoiart.com - Art & Design Blog
bathroomwriter.com - Interested in helping out with Beta Testing? PM me.
User avatar
dflynn
500+ Club
 
Posts: 831
Joined: Wed Oct 03, 2007 10:06 pm
Location: Guelph, Canada

Postby rangana on Fri Jun 20, 2008 4:10 am

Hi dflynn,
border is a deprecated attribute. Though width and height is not yet deprecated, I'm encouraging to start using presentation instead.

CSS should be able to work this:
Code: Select all
<img src="yourimage.jpg" style="width:100px;height:100px;border:0px;">


Hope it helps.
~ Get me some work, I do freelancing ~
User avatar
rangana
500+ Club
 
Posts: 929
Joined: Wed Feb 27, 2008 6:14 am
Location: Cebu City Philippines

Postby sator75 on Fri Jun 20, 2008 11:47 am

It works but if i put this code in the css file:

a:img {
border: 0;
}

i thought the result was the same.
What d'you think?
sator75
 
Posts: 9
Joined: Sun Jun 08, 2008 6:12 pm

Postby rangana on Fri Jun 20, 2008 12:13 pm

It will not work since its erroneous.
There's not img pseudo class for img element.
~ Get me some work, I do freelancing ~
User avatar
rangana
500+ Club
 
Posts: 929
Joined: Wed Feb 27, 2008 6:14 am
Location: Cebu City Philippines

Postby sator75 on Fri Jun 20, 2008 5:01 pm

You're right, but is there a way to put this feature directly in the css together with a:link and so on?
sator75
 
Posts: 9
Joined: Sun Jun 08, 2008 6:12 pm

Postby rangana on Sat Jun 21, 2008 1:44 am

There are always possibility, but I would'nt speak of any without seeing how your markups is arranged.
~ Get me some work, I do freelancing ~
User avatar
rangana
500+ Club
 
Posts: 929
Joined: Wed Feb 27, 2008 6:14 am
Location: Cebu City Philippines


Return to CSS Forum

Who is online

Users browsing this forum: No registered users and 1 guest