The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to add a <base target='_blank'/> code to the CSS Stylesheet

4 posters

Go down

Solved How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by jkh June 28th 2019, 5:02 pm

Hello

Could someone please tell me how to add this code to the CSS Stylesheet?
<base target='_blank'/>

I can see it's not just a simple case as adding it to the top...

Many thanks,


Last edited by jkh on June 28th 2019, 7:58 pm; edited 1 time in total
jkh
jkh
Forumember

Posts : 645
Reputation : 17
Language : english

http://jillhavern.forumotion.net/

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by YoshiGM June 28th 2019, 5:08 pm

Hello, if you want to add a CSS in HTML you need to do is add this tag_

Code:
<style>
YOUR CSS GOES HERE!
</style>

You can also create a special and unique div for your code :

Code:

.base {
SOME SETTINGS FOR MY CODE
}

Code:

<div class="base"><base target='_blank'/>ANY CONTENT </div>

Hope it helps you Wink
YoshiGM
YoshiGM
Active Poster

Male Posts : 1562
Reputation : 146
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by jkh June 28th 2019, 5:13 pm

Not sure which code to use.
I tried the first one and it didn't accept it...

Should I just do this?
<style>
<base target='_blank'/>!
</style>
jkh
jkh
Forumember

Posts : 645
Reputation : 17
Language : english

http://jillhavern.forumotion.net/

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by YoshiGM June 28th 2019, 5:48 pm

I think you understood me in my last answer xDu



The HTML <style> only works if you use a CSS code like the second:

Code:

<style>
.base {
ANY CSS CODE HERE
}
</style>

Then if you want to call your code in HTML, just add next /style your div:

Code:

<style>
.base {
ANY CSS CODE HERE
}
</style>

<div class="base"> ANY CONTENT YOU WANT HERE </div>

P.S. You can't add a HTML Tag in the Cascading Stylesheet, because when you try to do it, the ACP will convert it automacally in a CSS to avoid problems but it may will result in a blank space sometimes.

YoshiGM
YoshiGM
Active Poster

Male Posts : 1562
Reputation : 146
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by jkh June 28th 2019, 5:56 pm

I'm afraid I'm still not understanding - I've put this code in the CCS stylesheet and it still won't take it.

<style>
.base {
<base target='_blank'/>
}
</style>

Do I just put it at the top (if so, it doesn't work) - or do I put it somewhere else?

or;

Do I use this code in the CCS Stylesheet?


<style>
.base {
<base target='_blank'/>
}
</style>

<div class="base"> <base target='_blank'/> </div>

If so, at the top or somewhere else?

If it doesn't go in the CCS Stylesheet at all, where do I put it?
jkh
jkh
Forumember

Posts : 645
Reputation : 17
Language : english

http://jillhavern.forumotion.net/

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by SLGray June 28th 2019, 7:18 pm

You can not use HTML code in the CSS styelesheet.

What exactly are you trying to do with this code?


How to add a <base target='_blank'/> code to the CSS Stylesheet Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by jkh June 28th 2019, 7:23 pm

I want to force links to open in a new tab.
jkh
jkh
Forumember

Posts : 645
Reputation : 17
Language : english

http://jillhavern.forumotion.net/

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by SLGray June 28th 2019, 7:47 pm



How to add a <base target='_blank'/> code to the CSS Stylesheet Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51555
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by jkh June 28th 2019, 7:57 pm

SLGray - yes, that's it, many thanks!

It needed to go in overall_header.

Sorted thumleft
jkh
jkh
Forumember

Posts : 645
Reputation : 17
Language : english

http://jillhavern.forumotion.net/

Back to top Go down

Solved Re: How to add a <base target='_blank'/> code to the CSS Stylesheet

Post by brandon_g June 28th 2019, 8:03 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


How to add a <base target='_blank'/> code to the CSS Stylesheet Brando10
Remember to mark your topic How to add a <base target='_blank'/> code to the CSS Stylesheet Solved15 when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

How to add a <base target='_blank'/> code to the CSS Stylesheet Scre1476
Team Leader
Review Section Rules | Request A Review | Sticker Points
brandon_g
brandon_g
Manager
Manager

Male Posts : 10113
Reputation : 923
Language : English
Location : USA

https://www.broadcastingduo.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum