Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 05:26 PM
jetobe
Guest
 
Posts: n/a
Default Tag nesting problems (in content management system)

Hi everyone,

I am trying to debug someone's site which has

<h3><a href="www.legislation.qld.gov.au">Queensland Acts</a></h3>

The problem is that the <a> tag is taking precedence and overriding
the <h3> tags that they want the text to resemble.

It's problematic because it's a huge site (around 500 pages), it's in
MS Content Management Server 2002 (which means I can't access more
than one page at any one time - no global find/replace!, and templates
mean I have no access to the <head>) and this is occuring throughout
with all H1, H2, H3 tags that have an <a> within. Also because it's a
content management server, it's all been done through a user authoring
interface that automatically nests the tags in this order. Messy!!

I have tried using the !important tag in external CSS to give the
heading tags precedence over the <a> but it isn't working. Is there
any way I can force the <H3> to override the <a> when they are ordered
like this?

Thanks
  #2  
Old July 20th, 2005, 05:26 PM
Brian
Guest
 
Posts: n/a
Default Re: Tag nesting problems (in content management system)

jetobe wrote:[color=blue]
>
> <h3><a href="www.legislation.qld.gov.au">Queensland Acts</a></h3>
>
> The problem is that the <a> tag is taking precedence and overriding
> the <h3> tags that they want the text to resemble.[/color]

As it should.
[color=blue]
> because it's a content management server, it's all been done
> through a user authoring interface that automatically nests the
> tags in this order. Messy!![/color]

No, not messy. Conforming. <a><h3>heading</h3><a> is illegal syntax.
[color=blue]
> Is there any way I can force the <H3> to override the <a> when they
> are ordered like this?[/color]

You can't force anything on the web. But the following css should
give you better results:

h3 a { color: blue; }

Since your question is about css, why did you x-post to ciwah?
(f'ups set)

--
Brian
follow the directions in my address to email me

  #3  
Old July 20th, 2005, 05:26 PM
Jim Dabell
Guest
 
Posts: n/a
Default Re: Tag nesting problems (in content management system)

jetobe wrote:
[color=blue]
> I am trying to debug someone's site which has
>
> <h3><a href="www.legislation.qld.gov.au">Queensland Acts</a></h3>
>
> The problem is that the <a> tag is taking precedence and overriding
> the <h3> tags that they want the text to resemble.[/color]

You mean there are styles applied to <a> elements that you don't want to
apply to <a> elements within <h3> elements?

[color=blue]
> Also because it's a content management server, it's all been done through
> a user authoring interface that automatically nests the tags in this
> order. Messy!![/color]

No, /valid/. <a> elements cannot contain <h3> elements, if you were
thinking about changing the documents in that way.

[color=blue]
> I have tried using the !important tag in external CSS to give the
> heading tags precedence over the <a> but it isn't working.[/color]

It shouldn't. The !important declaration means that it should take priority
over user declarations in some cases. It's got nothing to do with making
elements inherit their parent's styling.

[color=blue]
> Is there any way I can force[/color]

You can't force anything. You can only suggest.

[color=blue]
> the <H3> to override the <a> when they are ordered like this?[/color]

Simply construct an appropriate selector and style matching elements
appropriately:

h3 a {
/* Your styles here */
}

Without knowing exactly what presentation you want to change, it's
impossible to say exactly which rules you should use. You'll probably want
to make use of the 'inherit' keyword though.

For future reference, it's better to supply a URL to an example document.


--
Jim Dabell

  #4  
Old July 20th, 2005, 05:27 PM
jetobe
Guest
 
Posts: n/a
Default Re: Tag nesting problems (in content management system)

Thanks everyone for your help, sorry I couldn't post an example URL as
it's intranet. (And yes the URL in the example was fake, and wrong,
my mistake, as real link was internal).

To clarify, there are some headings that they want to be linked, as
well as lower level items.

eg.

Queensland Acts (links to general page containing links to all Acts)
- Act #1
- Act#14

etc (link to acts with specific relevance).
Headings are maroon & larger, links are blue and underlined. Linked
headings are intended be Maroon & underlined & larger & there are
different shades for visited etc.

I will try the h3 a {..} suggestion.

Thanks.






Jim Dabell <jim-usenet@jimdabell.com> wrote in message news:<do2dnapY1Y1JKgKiRVn-ug@giganews.com>...[color=blue]
> jetobe wrote:
>[color=green]
> > I am trying to debug someone's site which has
> >
> > <h3><a href="www.legislation.qld.gov.au">Queensland Acts</a></h3>
> >
> > The problem is that the <a> tag is taking precedence and overriding
> > the <h3> tags that they want the text to resemble.[/color]
>
> You mean there are styles applied to <a> elements that you don't want to
> apply to <a> elements within <h3> elements?
>
>[color=green]
> > Also because it's a content management server, it's all been done through
> > a user authoring interface that automatically nests the tags in this
> > order. Messy!![/color]
>
> No, /valid/. <a> elements cannot contain <h3> elements, if you were
> thinking about changing the documents in that way.
>
>[color=green]
> > I have tried using the !important tag in external CSS to give the
> > heading tags precedence over the <a> but it isn't working.[/color]
>
> It shouldn't. The !important declaration means that it should take priority
> over user declarations in some cases. It's got nothing to do with making
> elements inherit their parent's styling.
>
>[color=green]
> > Is there any way I can force[/color]
>
> You can't force anything. You can only suggest.
>
>[color=green]
> > the <H3> to override the <a> when they are ordered like this?[/color]
>
> Simply construct an appropriate selector and style matching elements
> appropriately:
>
> h3 a {
> /* Your styles here */
> }
>
> Without knowing exactly what presentation you want to change, it's
> impossible to say exactly which rules you should use. You'll probably want
> to make use of the 'inherit' keyword though.
>
> For future reference, it's better to supply a URL to an example document.[/color]
  #5  
Old July 20th, 2005, 05:27 PM
Tim
Guest
 
Posts: n/a
Default Re: Tag nesting problems (in content management system)

On 28 Oct 2003 18:39:52 -0800,
jane.earle@dpi.qld.gov.au (jetobe) wrote:
[color=blue]
> I am trying to debug someone's site which has
>
> <h3><a href="www.legislation.qld.gov.au">Queensland Acts</a></h3>[/color]

Which is the proper way to do it.
[color=blue]
> The problem is that the <a> tag is taking precedence and overriding
> the <h3> tags that they want the text to resemble.[/color]

What are you hoping that the H3 *ELEMENT* is going to do? Having the
contents *also* a link means that the text is going to be highlighted as
a link (possibly coloured and underlined), as well as whatever H3
renders as (probably a bigger and bolder font).

Or another way to put that, is what don't you want the A element inside
a H3 element to do?

(H3 meaning a sub-sub-heading, just in case you're trying to do
something oddball with H3 elements, too.)
[color=blue]
> It's problematic because it's a huge site (around 500 pages), it's in
> MS Content Management Server 2002 (which means I can't access more
> than one page at any one time - no global find/replace!, and templates
> mean I have no access to the <head>) and this is occurring throughout
> with all H1, H2, H3 tags that have an <a> within. Also because it's a
> content management server, it's all been done through a user authoring
> interface that automatically nests the tags in this order. Messy!![/color]

Actually it's doing it correctly, which is a nice change.
[color=blue]
> I have tried using the !important tag in external CSS to give the
> heading tags precedence over the <a> but it isn't working. Is there
> any way I can force the <H3> to override the <a> when they are ordered
> like this?[/color]

All I can guess is that you want the content of H3 elements to look the
same whether there's a link, or not, inside them (and that's only a
guess). If that's right, then you want to play with styling the A
elements that are children of H elements, to modify how those particular
A elements will look (without affecting the rest, nor necessitating you
having to make special classes of elements in the HTML). Leave your
styling for your H3 elements alone.

Something like:

h3 > a {text-decoration: none;}

See: <http://www.w3.org/TR/REC-CSS2/selector.html#q1>
<http://www.w3.org/TR/CSS2/text.html#q3>

--
My "from" address is totally fake. (Hint: If I wanted e-mails from
complete strangers, I'd have put a real one, there.) Reply to usenet
postings in the same place as you read the message you're replying to.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles