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 28/6/2019, 18:02

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 28/6/2019, 20:58; edited 1 time in total
jkh
jkh
Forumember

Posts : 620
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 28/6/2019, 18:08

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 : 1500
Reputation : 144
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 28/6/2019, 18:13

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 : 620
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 28/6/2019, 18:48

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 : 1500
Reputation : 144
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 28/6/2019, 18:56

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 : 620
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 28/6/2019, 20:18

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 : 51489
Reputation : 3519
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 28/6/2019, 20:23

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

Posts : 620
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 28/6/2019, 20:47



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 : 51489
Reputation : 3519
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 28/6/2019, 20:57

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

It needed to go in overall_header.

Sorted thumleft
jkh
jkh
Forumember

Posts : 620
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 28/6/2019, 21:03

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 : 10106
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