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

Forum

Log In Sponsors
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 6: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: 144
Joined: Mon Mar 19, 2007 4:40 pm
Location: Atlantic City, NJ

Postby rangana on Thu Apr 24, 2008 2: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 ;)
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby sator75 on Thu Jun 19, 2008 10: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 5:12 pm

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

add border="0" within the image tag.


ex.
<img src="yourimage.jpg" width="100px" height="100px" border="0">
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Postby rangana on Fri Jun 20, 2008 3: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.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby sator75 on Fri Jun 20, 2008 10: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 5:12 pm

Postby rangana on Fri Jun 20, 2008 11:13 am

It will not work since its erroneous.
There's not img pseudo class for img element.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Postby sator75 on Fri Jun 20, 2008 4: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 5:12 pm

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

There are always possibility, but I would'nt speak of any without seeing how your markups is arranged.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 0 guests