Changing the appearance of A HREF

Reply

Join Date: Dec 2007
Posts: 594
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Pro

Changing the appearance of A HREF

 
0
  #1
Apr 20th, 2008
I am trying to set the the attributes (border, width, etc) of a href tag using CSS.

But it is being very annoying!

Padding is working and color and thats just about it.

Width, height, borders (only see 2/3 out of the 4 sidded box), etc.

Any ideas?

Thanks, Regards X

PS: Note when I use the style on other tags there are different outcomes.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 73
Reputation: lio04 is an unknown quantity at this point 
Solved Threads: 4
lio04's Avatar
lio04 lio04 is offline Offline
Junior Poster in Training

Re: Changing the appearance of A HREF

 
0
  #2
Apr 20th, 2008
A href tag is only link, you can't set border, height, width.

These attributes you can set to any <div id="">, <img> tags and other, which be bounded between <a href="#"></a>.

Show here your code, because we don't know, what you need create with code.
Last edited by lio04; Apr 20th, 2008 at 2:03 pm.
Jabber: lio(at)jabbim(dot)sk
Sorry for my English, I am only an autodidact.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 594
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Pro

Re: Changing the appearance of A HREF

 
0
  #3
Apr 21st, 2008
pretty much just using css to make a href a box.

HTML and CSS Syntax (Toggle Plain Text)
  1. style="border: 3px solid; etc";

so you saying if i encapsulate it inside a div tag it will work?
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 73
Reputation: lio04 is an unknown quantity at this point 
Solved Threads: 4
lio04's Avatar
lio04 lio04 is offline Offline
Junior Poster in Training

Re: Changing the appearance of A HREF

 
0
  #4
Apr 21st, 2008
E.g. like this

In HTML file will be:
HTML and CSS Syntax (Toggle Plain Text)
  1. <a href="#"><div id="box">Active box</div></a>

In CSS file will be:
HTML and CSS Syntax (Toggle Plain Text)
  1. #box{
  2. width: 160px;
  3. height: 180px;
  4. background-color: black;
  5. border: 3px solid #A2A2F2;
  6. color: white;
  7. font-size: 36px;
  8. }

This is only short example..
Last edited by lio04; Apr 21st, 2008 at 4:11 am.
Jabber: lio(at)jabbim(dot)sk
Sorry for my English, I am only an autodidact.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 594
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Pro

Re: Changing the appearance of A HREF

 
0
  #5
Apr 21st, 2008
sounds cool ill try it and get back to you, thankyou
Last edited by OmniX; Apr 21st, 2008 at 4:47 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,193
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 163
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Sensei

Re: Changing the appearance of A HREF

 
0
  #6
Apr 22nd, 2008
That won't validate - it's tag soup.

The anchor tag is an inline tag, and you can't put a block tag pair inside an inline tag pair. Div is a block tag.

You can't put box properties on inline tags either.

Put the anchor inside the div instead, and attach the box properties to the div.
Last edited by MidiMagic; Apr 22nd, 2008 at 3:48 am.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 594
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Pro

Re: Changing the appearance of A HREF

 
0
  #7
Apr 22nd, 2008
Thats what I thought so should be like:

HTML and CSS Syntax (Toggle Plain Text)
  1. <div>
  2. <a href>
  3. LINK
  4. </a>
  5. </div>

Thats it?

Been to busy at work to test it.

Regards, X
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC