/    Sign up×
Community /Pin to ProfileBookmark

Easy Questions: Increase text via style sheet

Basically, there is a default text size and I am printing out a title. I want to make the title one or two sizes than whatever the default is. I can’t just use CSS’ font-size attribute and give a ‘px’ value. How can I do it?

And another easy question (since you’re in here):

Why doesn’t this code work (OK, I’m still strugglin’ w/CSS)?

[CODE]<body>
<style type=’text/css’>
p, p.instructions, li.instructions, div.instructions {margin:0in;}
.surveytitle {text-align: center}
</style>

<span class=”surveytitle”>Title Text</span>[/CODE]

It’s not being centered.

Thanks.

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 21.2005 — You can assign a percentage to your font size: [b]font-size: 150%;[/b] would be 1.5 times the size of the base font.

Your <style> section belongs inside of the <head> section of your document, not the <body> section.

<span> is an in-line element, but text-align only applies to block-level, table cell, and inline block elements. Try using a <p> instead (or whatever other block-level element would make semantic sense there).
Copy linkTweet thisAlerts:
@JSchwarzauthorJul 21.2005 — Thank you for the answer and explanation.
×

Success!

Help @JSchwarz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...