MyBB Community Forums

Full Version: header link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how can I force a link in the header to open in new window or new tab by default ?
Which link?

a normal link looks something like <a href="http://www.mybboard.net">MyBBoard.net</a>

but, if you want it to open in a new window just add target="_blank"

so now it'd look like <a href="http://www.mybbaord.net" target="_blank">MyBBoard.net</a>

If you want a title for your links (a tooltip - a message that shows when people hover) you can also add title="This will take you to MyBBoard.net"

so that link would be <a href="http://www.mybbaord.net" title="This will take you to MyBBoard.net" target="_blank">MyBBoard.net</a>

Let's say you want an image to be a link.. you then want to create an alt tag.. this is a piece of text that shows up in place of an image, just incase it doesn't show up in certain browsers, such as..

<a href="http://www.mybbaord.net" alt="MyBBoard.net" title="This will take you to MyBBoard.net" target="_blank"><img src="http://www.mybboard.net/thisistheimagename.gif"></a>

Remember, alt tags are only needed for image links, not text links.
thank you very very ...... very much Smile