Forum Moderators: not2easy

Message Too Old, No Replies

Style links in Table

Without access to style sheet

         

BabyPanda

4:41 am on Feb 5, 2011 (gmt 0)

10+ Year Member



I use livejournal, and I'm trying to make a nicely organized layout for my master list. On livejournal, you can use HTML but you can't use style sheets. So I need a way to color my links using a style tag in the table.

Right now, I've got coding to change each link individually. Needless to say, that's tidious.

I've tried table style="a:{color:#8A4D79}" but it doesn't work. Any other ideas?

SuzyUK

9:01 am on Feb 5, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi BabyPanda, and welcome to WebmasterWorld!

short answer:
you can't.. unless you code each link manually, however even with that you can't style the :hover, :active states - the syntax for inline styling is <a style="color: #8A4D79;"> no braces in inline styles..

However.. and I don't know if Live Journal allows this, or strips internal <style> elements - but it works in eBay and other other sites which allow you to add content

..if you can input this into your page - anywhere! but preferably at the top of your code entering panel

<style type="text/css" media="screen">
#mystyles a:link {color: red;}
#mystyles a:hover {color: blue;}
</style>


There is nothing to say that embedded <style> tags can't appear within <body> tags, lots of widgets isolate their specific CSS this way ;)

Then wrap your whole HTML input with a <div id="mystyles"> or just isolate your table by giving it the ID

does that work?

not all sites allow this, because without the wrapper div ID knowledge you can effectively change the styles of the whole page, which some don't like for branding reasons - but give it a try and let us know please.. if it does work you can style to your hearts content :)