HTML Curses!!
- Started
- Last post
- 12 Responses
- janne76
So how would i put block level elements inside inline level elements without being arrested by the W3C police and get 20 years to life?
I just want to make some boxes to be covered entirely by one and the same <a> tag.
is this possible? workaround? hax0rs?
thanks.
- janne760
i am off for a smoke now and when i am back i demand solutions!! >:I
- bigtrickagain0
don't use an <a> tag - use an onclick event on a <div> instead?
- yes, i know that.. but then i need to tell the programmer. i guess that is the only way then?janne76
- janne760
bigtrick,
but what about Google?
Only follows them <a> tags right?
- bigtrickagain0
ok i'm not sure that putting block elements inside an <a> tag will make your page not validate. if you want block things inside an <a>, why don't you make the <a> with display:block? that should be consistent across browsers, and as far as i know does pass validation.
- alicetheblue0
block levels can't live inside inline elements - so I've learned :(
(isn't <a> an inline element, too?)- yes - that's why you have to override it in the css with display:blockbigtrickagain
- ahhh...
I've just got THIS far in CSS;-)
thanks!alicetheblue - will not validate though!janne76
- janne760
True bigtrick, yet it will not validate even with block override.
- bigtrickagain0
oh booo i guess you're right.
well, use spans instead of divs, and override the span's display with display:block in the css then - that seems to validate when i try it out.
- bigtrickagain0
like this:
http://lithegiant.com/temp/janneā¦
- janne760
bigtrick strikes again!
cheers man!
- janne760
also found out you can't put h1, p etc. inside the span, but that is solved with another span inside it with a class assigned to it and let css do the rest.
just for future reference, heh..
thanks for the help folks.
- bigtrickagain0
(:
- lukus_W0
display: inline;
display: block;