Forum Moderators: open

Message Too Old, No Replies

Using <BASE> on only part of a page

         

amsmota

7:29 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



Well, the subject says it all, i want to put reference links in part of my HTML page (for example a <div> block) going to a relative path diferent fron the rest of the page.

Is there any way to do it?

Thanks.

cuce

10:10 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



To my understanding if you add a <base> tag in your code, it is only applied to the elements that appear after it.

I'm pretty sure it's bad practice to use base outside of your head, but if you were to make the last <div> appearing in your code with a <base> before the content, I suppose it could work, but it wouldnt be pretty.

I don't know maybe some php might be the solution?

any other suggestions?

encyclo

1:42 am on Jul 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The
base
element is for use in the
head
section only, and it operates for the whole document. You cannot use it in any other way and expect it to work.

One option you have is to include the section as an

iframe
rather than a
div
- as an
iframe
is a separate document, you can use the
base
element there to cover all the links in that inserted page.

cuce

8:40 pm on Jul 29, 2005 (gmt 0)

10+ Year Member



I have noticed before, that if I put my <base> after my <link> to my css, the base wont apply to the css <link>.

I think thats where I got that crazy idea.

amsmota

11:52 am on Aug 2, 2005 (gmt 0)

10+ Year Member



I couldn't find a solution to this (well, i did, i've replaced "src=" with "src=../") and it seems strange cause it seems a trivial thing people would do...

I didn't try iframes, i don't know why but i don't like frames nor iframes... But i love Ajax :)...