Making the header an active link, Chaos Theory
-
I’m using the Chaos Theory theme. I inserted a header into my stylesheet and thus moved the applicable text (the name of the blog and description) off the page via a ‘left:-9000px;’ code. The link to the homepage is attached to this text however so in moving this off the screen, I have lost the handy dandy back to home link the banner typically provides.
I found a string of code that is supposed to make a div into a link (
<div id="header" onclick="location.href='<?php bloginfo('url');?>';" style="cursor:pointer;"></div>) but I’m either using it incorrectly or it’s not working on this particular theme. Any suggestions on how I can make my banner clickable while forgoing the related text is appreciated. Thank you in advance!The blog I need help with is: (visible only to logged in users)
-
The website in question is http://halo3screenshots.com/. Apologies for forgetting to post it in the op. :)
-
Sorry, I know nothing about CSS, but I HAVE to say; that is one snazzy-looking blog you’ve got. Good work!
-
LOL, thanks! It’s a geeky gaming blog so it’s not for everyone but I certainly have fun there. :)
-
That code won’t work here since it has PHP and event triggers that are stripped out by the wp.com software.
-
did u tried this code??just replace # with your website url and remember this should be in html not in CSS.
<div id=”header”>
<div id=”innerheader”>
<h1 id=”blog-title”>ihearthalo3screenshots</h1>
<div id=”blog-description”></div>
</div></div>
-
lol never mind i cant seem to type link code in here but heres a hint simple link code after header div and finish that link code before the last div here
-
*sigh*
You do know that writing/modifying HTML code is not possible in blogs hosted at wp.com, right sanjeetpal?
-
Well shoot. The magical string of code not working for WP.com themes is no good! Is anybody aware of any other workarounds for this or am I stuck with having to layer text on top of my header image?
-
@bsangel: Try this in a text widget:
<div align="center" style="width:100%;top:NUMBER1_HERE;left:0;position:absolute;-moz-opacity:0;opacity:0;z-index:11;"> <a href="URL_OF_BLOG_HERE"><img border="0" src="URL_OF_ANY_IMAGE_HERE" width="NUMBER2_HERE" height="NUMBER3_HERE"></a> </div>This will produce a transparent linking image superimposed on your header image. Try it without the opacity parts of the code first, to see where the image lands and find out the proper Number1 (can’t supply it myself, since you’ve modified the theme). Numbers 2 & 3 should be the actual dimensions of your header image.
-
That worked like a charm panaghiotisadam! I had no idea you could enter coding into the text widgets and have it affect the theme. You completely saved the day with a core navigation issue on my blog. I really just can’t thank you enough. Should you ever need anything that I could help you with (I don’t know what that would be but heck, I’d be willing to do it!), please just let me know. THANK YOU!!
-
You’re welcome. Position-absolute is what I like to think of as the magic code; it doesn’t really affect the theme: it just sends an object to a specific point on the page instead of inside the widget.
And thanks for your kind response, but we volunteers here are happy to help if we can – no return favor needed!
- The topic ‘Making the header an active link, Chaos Theory’ is closed to new replies.