Wednesday, July 25th, 2007 10:00 am

help. help. help.

Help plz. CSS trying to kill me. In a very geeky way.

Okay, I set up a CSS with all links are bold, red. Problem: the a name links for internal page jumps are *also* red and bold now. Is there a way to fix this from the style sheet or do I need to do an in-line for this page to stop that from happening? Is there a way to differentiate A HREF from A Name?

Style sheet below cut.





BODY {background: #FFFFFF;
scrollbar-base-color: #FFFFFF;
scrollbar-track-color: #FFFFFF;
scrollbar-face-color: #FFFFFF;
scrollbar-highlight-color: #000000;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #FFFFFF;
scrollbar-shadow-color: #000000;
scrollbar-arrow-color: #000000;
}

a{text-decoration:none; color:#990000; font-weight:bold}
a:hover {color:#ff0000;}

H1 {font-family: Tahoma; font-size: 20pt; text-align: center;}
P {font-family: Tahoma; font-size: 10pt; text-align: left;}
P.first {font-family: Tahoma; font-size: 10pt; text-align: left; text-decoration: underline}
P.scnd {font-family: Tahoma; font-size: 16pt; text-align: left; font-weight: bold;}
P.thrd {font-family: Tahoma; font-size: 10pt; text-align: right; font-weight: bold;}
P.frth {font-family: Tahoma; font-size: 10pt; text-align: left; font-weight: bold;}
P.fifth {font-family: Tahoma; font-size: 9pt; text-align: left;}
P.sixth {font-family: Tahoma; font-size: 14px; text-align: center; color: #FFFFFF;}

ul {list-style-type: square; font-family: Tahoma; font-size: 10pt; text-align: left;}
ol {list-style-type: square; font-family: Tahoma; font-size: 10pt; text-align: left;}

#back {background:#003366; height: 72px;}
#heartlayout {margin:0px auto; border:1px; padding:10px;}
#header {border:1px; height:100px; padding:1px;}
#content {margin-top:1px; padding-bottom:1px}
#content div {border:5px; float:left}
#content-left {width:20%;}
#content-right {width:75%;}
#bottom {clear:both; text-align:right;}


New Chapter - HR
p.first - underlined points
p.scnd - new topics under chapters
p.thrd - bottom links to next chapters
p.frth - top links to previous chapters
p.fifth - links bottom
p.sixth - images

internal relation to names are in bold unless otherwise indicated.
ext_1541: (Default)

From: [identity profile] summertea.livejournal.com Date: 2007-07-25 03:16 pm (UTC)
You can set up a class for internal links (class="internal" in HTML, .internal in the CSS). I believe CSS can't tell the difference between internal and external links. To CSS, it's all just "a".

(Someone correct me if I'm wrong. XD;)
ext_1813: (nerdy nerdiness by Marc)

From: [identity profile] ms-nerd.livejournal.com Date: 2007-07-25 03:29 pm (UTC)
You're right. Unless you set up a class defining external and internal links, it doesn't know the difference.

From: [identity profile] ileliberte.livejournal.com Date: 2007-07-25 03:17 pm (UTC)
Do you want to change the a href link colors to something different? You can do that by defining a subclass of a links, like:
a.newlinks{text-decoration:none; color:#990000; font-weight:bold}
a.newlinks:hover {color:#ff0000;}
and then go into the html page and add 'class="newlinks"'to the a href tags, so yes, you will have to go into the html page to add those, it can't be just fixed through the stylesheet as far as I know.

From: [identity profile] ileliberte.livejournal.com Date: 2007-07-25 06:07 pm (UTC)
Also, #newlinks would be an id and so you would want to use it just once since it's a unique identifier, .newlinks would be class and you can have both an id and a class for the same tag. And these commands will go into the < style >< /style > tag in the head of the document. If the stylesheet is external, make sure you don't have any css directly on the < a href > or < a name > link itself in the body of the document since the style that comes last overrules the previous command if the elements overlap.
ext_1813: (nerdy nerdiness by Marc)

From: [identity profile] ms-nerd.livejournal.com Date: 2007-07-25 03:28 pm (UTC)
I had the same problem when I set up our website. My master css sheet has all links defaulting to navy blue so I had to define each set of links for each page:

This is in the style tag:

#pmenu1 a {text-align: right; color:white; font-weight:bold; text-decoration:none; font-family: arial, helvetica, sans-serif; font-size: 12pt;}
#pmenu1 a:hover{color:silver ; font-weight:bold;}
menulinks2 {position:center;}

This is in the body: (replace [ ] with < >)
[div id="pmenu1"]
[a href="index.html" class="menulinks"]home [/a]
[a href="avionics.html" class="menulinks"] avionics[/a]
[a href="fbo.html" class="menulinks"] fbo[/a]
[/div]

etc.

You can see it in action here: http://www.penta-aviation.com/ If you look at the code, you can see that for every page, because I wanted it a different colour I had to define the a href colours for each menu.

My page is a jumble of css and regular code but hey it works! I'm slowly getting everything moved over to css though.

I hope this helps!!! If this doesn't post properly, just go to http://www.penta-aviation.com and look at my code.

From: [identity profile] seperis.livejournal.com Date: 2007-07-25 04:26 pm (UTC)
It really does. I like this!

now to see if I can implement it.

Hmm. What's really confusing me is that i use a variatoin, minus div tags, of this style sheet for my own webpage and I haven't had this problem with a names. *thoughtful* Hmm.

From: [identity profile] tienriu.livejournal.com Date: 2007-07-25 03:59 pm (UTC)
Hi -

As above, you can set it up in a class, i.e.:

.internal_link {
text-decoration: underline;
color: #000000;
}

And call it this way: < a name = "[blah]" class="internal_link" >test test< / a>

Or, if your internal < a name > links have ID tags (i.e. test test</ a>
you can reference them this way:

#ID_NAME {
text-decoration: underline;
color: #000000;
}

cheers
TR
()

From: [identity profile] seperis.livejournal.com Date: 2007-07-25 05:11 pm (UTC)
Okay, I'm--lousy at this. I mean, it's all--*sighs*. This is embarrassing.

Where, exactly, do I put the code?

#back {background:#003366; height: 72px;}
#heartlayout {margin:0px auto; border:1px; padding:10px;}
#header {border:1px; height:100px; padding:1px;}
#content {margin-top:1px; padding-bottom:1px}
#content div {border:5px; float:left}
#content-left {width:20%;}
#content-right {width:75%;}
#bottom {clear:both; text-align:right;}
<--here?

Also, does it make a difference that the a name link is also set to P Class="scnd" ?

From: [identity profile] tienriu.livejournal.com Date: 2007-07-25 09:37 pm (UTC)
Heya -

You can put it anywhere (so where you've said "<-- here" is fine). CSS styles can be overwritten though so the lower in the list the better. (For instance, any inline styles you have on the page will overwrite anything you have in your .css page)

It doesn't make a difference that the A name link is set to a P class.

HOWEVER, if all your a name links are in that P class you can just tell that P class to style the a name links.

In other words, you don't need to go back and make changes to every A name link you have.

If your A name links are set up this way:

< a name=" [blah] " class="scnd" >

Then in your CSS stylesheet, make your modifications. For example:

.scnd {
/* your other code */
color: #00000;
text-decoration: none;
}

If however your A name links are set up this way:

< p class="scnd" >
< a name= "[blah]" > test test < /a >
< /p >

Then to change your A name links, do this:

.scnd a:link {
text-decoration: none;
color: #000000;
}

This tells your page that any links within the class 'scnd' should be styled in a certain way.

Hope this makes sense!

TR

Profile

seperis: (Default)
seperis

Tags

Quotes

  • If you don't send me feedback, I will sob uncontrollably for hours on end, until finally, in a fit of depression, I slash my wrists and bleed out on the bathroom floor. My death will be on your heads. Murderers
    . -- Unknown, on feedback
    BTS List
  • That's why he goes bad, you know -- all the good people hit him on the head or try to shoot him and constantly mistrust him, while there's this vast cohort of minions saying, We wouldn't hurt you, Lex, and we'll give you power and greatness and oh so much sex...
    Wow. That was scary. Lex is like Jesus in the desert.
    -- pricklyelf, on why Lex goes bad
    LJ
  • Obi-Wan has a sort of desperate, pathetic patience in this movie. You can just see it in his eyes: "My padawan is a psychopath, and no one will believe me; I'm barely keeping him under control and expect to wake up any night now to find him standing over my bed with a knife!"
    -- Teague, reviewing "Star Wars: Attack of the Clones"
    LJ
  • Beth: god, why do i have so many beads?
    Jenn: Because you are an addict.
    Jenn: There are twelve step programs for this.
    Beth: i dunno they'd work, might have to go straight for the electroshock.
    Jenn: I'm not sure that helps with bead addiction.
    Beth: i was thinking more to demagnitize my credit card.
    -- hwmitzy and seperis, on bead addiction
    AIM, 12/24/2003
  • I could rape a goat and it will DIE PRETTIER than they write.
    -- anonymous, on terrible writing
    AIM, 2/17/2004
  • In medical billing there is a diagnosis code for someone who commits suicide by sea anenemoe.
    -- silverkyst, on wtf
    AIM, 3/25/2004
  • Anonymous: sorry. i just wanted to tell you how much i liked you. i'd like to take this to a higher level if you're willing
    Eleveninches: By higher level I hope you mean email.
    -- eleveninches and anonymous, on things that are disturbing
    LJ, 4/2/2004
  • silverkyst: I need to not be taking molecular genetics.
    silverkyst: though, as a sidenote, I did learn how to eviscerate a fruit fly larvae by pulling it's mouth out by it's mouthparts today.
    silverkyst: I'm just nowhere near competent in the subject material to be taking it.
    Jenn: I'd like to thank you for that image.
    -- silverkyst and seperis, on more wtf
    AIM, 1/25/2005
  • You know, if obi-wan had just disciplined the boy *properly* we wouldn't be having these problems. Can't you just see yoda? "Take him in hand, you must. The true Force, you must show him."
    -- Issaro, on spanking Anakin in his formative years
    LJ, 3/15/2005
  • Aside from the fact that one person should never go near another with a penis, a bottle of body wash, and a hopeful expression...
    -- Summerfling, on shower sex
    LJ, 7/22/2005
  • It's weird, after you get used to the affection you get from a rabbit, it's like any other BDSM relationship. Only without the sex and hot chicks in leather corsets wielding floggers. You'll grow to like it.
    -- revelininsanity, on my relationship with my rabbit
    LJ, 2/7/2006
  • Smudged upon the near horizon, lapine shadows in the mist. Like a doomsday vision from Watership Down, the bunny intervention approaches.
    -- cpt_untouchable, on my addition of The Fourth Bunny
    LJ, 4/13/2006
  • Rule 3. Chemistry is kind of like bondage. Some people like it, some people like reading about or watching other people doing it, and a large number of people's reaction to actually doing the serious stuff is to recoil in horror.
    -- deadlychameleon, on class
    LJ, 9/1/2007
  • If imitation is the sincerest form of flattery, then Fan Fiction is John Cusack standing outside your house with a boombox.
    -- JRDSkinner, on fanfiction
    Twitter
  • I will unashamedly and unapologetically celebrate the joy and the warmth and the creativity of a community of people sharing something positive and beautiful and connective and if you don’t like it you are most welcome to very fuck off.
    -- Michael Sheen, on Good Omens fanfic
    Twitter
    , 6/19/2019
  • Adding for Mastodon.
    -- Jenn, traceback
    Fosstodon
    , 11/6/2022

Credit

November 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2022
Page generated Feb. 23rd, 2026 09:38 am
Powered by Dreamwidth Studios