Font Tag?

View previous topic View next topic Go down

avatar
Seabody
Member
Member
Forum Posts : 9
Member Since : 2012-03-30
View user profile

PostSeabody on 2/5/2012, 12:47 am

Since the Font tag has been deprecated, I am searching for a replacement for my new forum. Editing my CSS is (I believe) out of the question, and the Div tag doesn't give the result I want (it inserts a line break above and below it, which is not what I want) - what tag can replace the font tag?
avatar
Vanilla990
Administrator
Forum Posts : 114
Member Since : 2011-10-30
View user profile

PostVanilla990 on 2/5/2012, 1:01 am

I'm struggling to understand what you are asking for help with.

Are you trying to work out a way of changing the type of font used on your forum?
avatar
Mike
Administrator
Forum Posts : 446
Member Since : 2011-10-28
View user profile http://www.codinghelp.org

PostMike on 2/5/2012, 5:38 am

you can replace font tags using css and div's.. if it adds a line break it shouldnt..

here's all the css youd need to know.

Code:
<div class="font">random</div>

Code:
.font {
font-size: --px;
font-family: 'Georgia', Arial, Serif;
line-height: 125%;
color: #000;
avatar
LGforum
Moderator
Forum Posts : 77
Member Since : 2011-11-12
View user profile

PostLGforum on 2/5/2012, 12:51 pm

A DIV may appear as causing line breaks due to it naturally rendered style of display:block. DIV's have 'block' display property unless set other wise, its known as a block element.

A SPAN is an inline element, which you may prefer.

Code:
<span style="font:bla bla bla">bla bla text</span>


Last edited by LGforum on 3/5/2012, 4:39 pm; edited 1 time in total
avatar
Rideem3
Premium Member
Premium Member
Forum Posts : 8
Member Since : 2011-12-28
View user profile http://malware-site.www/

PostRideem3 on 3/5/2012, 4:36 pm

You don't even need to use a class (you could, but you houldnt unless it's for multiple elements).

Simply use the SPAN tag like LG said Wink :
Code:
<span style="font-color: #FFFFFF;">Text</span>
avatar
Seabody
Member
Member
Forum Posts : 9
Member Since : 2012-03-30
View user profile

PostSeabody on 5/5/2012, 10:00 pm

Yes, thank you LGForum!

@Vanilla, I was a bit unclear. I meant that, since HTML5 has deprecated the tag, what can I use to replace it? As in, instead of using this:

Code:

<font color="red">Hi</font>

What could I use?
avatar
grimofdoom
Member
Member
Forum Posts : 106
Member Since : 2012-03-06
View user profile

Postgrimofdoom on 6/5/2012, 5:16 am

you could use a couple of css text and font.A couple examples
Code:
{font-size:24;text-decoration:none;color:red;text-align:center;}
you can check out more at w3school
avatar
Mike
Administrator
Forum Posts : 446
Member Since : 2011-10-28
View user profile http://www.codinghelp.org

PostMike on 6/5/2012, 5:23 am

you can use this Seabody -


Code:
<span style="color: #ff0000;">Hi</span>
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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