mrdee
Feb 10 2008, 05:43 PM
| | Hello, I would like to ask a question about setting a style for titles on my web site. So far I have managed to set my titles with a different capital by doing this:
CODE h1.title:first-letter {color: gold; font-size=xx-large; font-style: oblique; background: black}; Then my titles come out with a big golden italic capital in a black box, and I get there by doing CODE <h1 class="title">Blablablablabla</h1> However, if I also want a certain background for the rest of my title, eg. a golden background or even a background image, how do I set that in the same "h1.title" setting? The setting h1.title:first-letter only seems to affect the first letter. Also, I want this to only affect my headers for titles, not just any header (h1). Is there anyone who can help me out here? Thanks in advance.
|
Reply
truefusion
Feb 10 2008, 05:58 PM
Remove :first-letter and modify a bit: CODE h1.title { background: gold; } For background image: CODE h1.title { background-image: url(path_to_image.ext); } Do note, however, that the golden background may cause some visual issues with the first letter of the H1 element with the title class.
Reply
mrdee
Feb 10 2008, 06:05 PM
QUOTE(truefusion @ Feb 10 2008, 05:58 PM)  Remove :first-letter and modify a bit: CODE h1.title { background: gold; } For background image: CODE h1.title { background-image: url(path_to_image.ext); } Do note, however, that the golden background may cause some visual issues with the first letter of the H1 element with the title class. Thank you for your reply, truefusion. However, doing it your way removes the special capital at the beginning of the title, which is exactly what I would like to keep.
Reply
rvalkass
Feb 10 2008, 06:53 PM
If I understand what you want, you just need two declarations to get it done. CODE /* Applies to all the other letters */ h1.title { color: #0000FF; font-size:0.1em; background-color: #FF00FF; };
/* Applies only to the first letter */ h1.title:first-letter { color: gold; font-size=xx-large; font-style: oblique; background: black }; I see no reason why it can't be done that way.
Reply
kobra500
Feb 10 2008, 07:01 PM
Yes it shoudl work like that because the specific letter will overright the specifications set in the previous statement!
Reply
mrdee
Feb 10 2008, 08:39 PM
Thanks for your help. That did the trick.
Reply
Recent Queries:--
background - 30.16 hr back. (1)
-
cssstylegen - 92.41 hr back. (7)
Similar Topics
Keywords : css, setting, style, titles,
- Style Not Displayed Correctly On Firefox [resolved]
(16)
Need Help On "global News" Problem.
Change paragraph of text with CSS style change? (7) I am making a website for my IT Support class and a program called "Cox Connects Kids" for my
mid-term assignment. Now I have the whole layout made and I will post a screen shot down lower. My
basic problem/question is this: I have a right section of the page(A div) and it is supposed to be
a global news part that shows the same on every page(I.e. home,contacts,help) and I was wondering if
I can somehow edit my CSS file to have it in there and just change it the one time for all the
pages. I am guessing there is some way to do this but I couldn't figure it out. I....
Creating Style Sheets
(5) I am attempting to create style sheets in order to make editing easier. I have created one style
sheet that has the basics for my horizontal menu. However I would like to create another that will
have the links for the menu. My first menu works because it is all css formatted. However, the
portion I want to use that has the "link details" is in .html. Can this be put into a style sheet,
and if so how do I create that? The website can be viewed at http://www.faithcity.org/test2.html ....
Alternate Style Sheet
hows that? (6) I know that you can declare alternate stylsheets for your pages, but i dont know how will a user
change it, i mean, i know you can change styles depending on media, or even with some js or server
side coding, but with pure html? how does the user set what style he wants to be displayed? the
code goes something like that: CODE <link title="Alternate Style"
href="/alt1.css" rel="alternate stylesheet" media="screen"
type="text/css" /> thanks... -lozbo....
Free: Css - Style Sheet Editors And
CSS Scrollbar Makers (7) CSS - Style Sheet Editors : Ranfo Cascading Style Sheet Editor http://ranfo.com/csseditor.htm
EclipseStyle http://www.greeneclipsesoftware.com/eclipsestyle.htm BHead - Meta Tags & CSS
Generator http://home5.swipnet.se/~w-52253/hyper/pro...ead/bhsetup.exe CSS Style Generator
http://www.10002.org/download/CSSStyleGen.zip Balthisar Cascade
http://www.balthisar.com/site/index.php CSS Scrollbar Makers: Scrollbar Skinner
http://www.survivorx.com/telechargement/Sc...%20Skinner2.zip ScrollBar
http://home.hccnet.nl/s.j.francke/software...ollbarsetu....
Looking for css, setting, style, titles,
|
|
Searching Video's for css, setting, style, titles,
|
advertisement
|
|