| | |
Changing the appearance of A HREF
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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.
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.
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.
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.
Sorry for my English, I am only an autodidact.
pretty much just using css to make a href a box.
so you saying if i encapsulate it inside a div tag it will work?
HTML and CSS Syntax (Toggle Plain Text)
style="border: 3px solid; etc";
so you saying if i encapsulate it inside a div tag it will work?
E.g. like this
In HTML file will be:
In CSS file will be:
This is only short example..
In HTML file will be:
HTML and CSS Syntax (Toggle Plain Text)
<a href="#"><div id="box">Active box</div></a>
In CSS file will be:
HTML and CSS Syntax (Toggle Plain Text)
#box{ width: 160px; height: 180px; background-color: black; border: 3px solid #A2A2F2; color: white; font-size: 36px; }
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.
Sorry for my English, I am only an autodidact.
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.
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
Thats what I thought so should be like:
Thats it?
Been to busy at work to test it.
Regards, X
HTML and CSS Syntax (Toggle Plain Text)
<div> <a href> LINK </a> </div>
Thats it?
Been to busy at work to test it.
Regards, X
![]() |
Other Threads in the HTML and CSS Forum
- Previous Thread: CSS in XTMLH
- Next Thread: ordinary to wiki help!!!!
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






