Results 1 to 10 of 18
Thread: Question about styling
-
Question about styling
13 Jul 2009 @ 03.20 Firefox complains about me writing like I am still doing basic html instead of css.......styling issues.
What I keep trying to figure out is how to do little things. I understand how to create a style and add it to my stylesheet, but I am talking about something different.
For instance. Here is an example:
[FONT=Century Gothic][SIZE=4]I write a sentence.[/SIZE][/FONT]
Now, I know how to apply a style to the whole sentence by writing it on my stylesheet. However, in order to make the word "sentence" in a red font and maybe a different font and keep it in the same sentence then how do I do that?
Because the only way I know how to create styles is either by applying the same style to the entire paragraph, or inserting styles into my <body> where they do not belong.Last edited by Dre; 13 Jul 2009 at @ 03.22. Reason: I should say "the" <body>, not "my" <body>. LOL!
-
13 Jul 2009 @ 03.29 Well, first, inline styles are not evil or anything. If you have one instance of a style within in an entire website, feel free to use inline styling for it.
You would wrap the the red word in <span> tags, that won't cause a newline.
-
13 Jul 2009 @ 05.45 you could also define in your style sheet as a class
.red{ color:#8B0000; }
then use <span class="red">Sentence</span>
-
13 Jul 2009 @ 10.10 I would agree with edbr, I would not use inline styles unless it really is needed,, so, span is my choice
-
13 Jul 2009 @ 11.11 Salted and edbr are on the right track, you do not need inline styles for anything. You can use classed span like edbr's example or you can use a semantic tag such as em.
Code:then use <em>Sentence</em>
Code:em { font-style:normal; color:red; }
-
13 Jul 2009 @ 15.51 Ok, guess I'm wrong lol.
You can use <em>, but remember: Only use <em> for emphasized text, just like you only use <strong> for bold text. More info on phrase tags at HTML em, strong, dfn, code, samp, kbd, var, cite tag
-
13 Jul 2009 @ 16.02
-
13 Jul 2009 @ 16.18 Regarding em, emphasized doesn't have to be italic, it be anything that emphasis's something, I see no harm in using a color and stripping away the italic styling. It is usually best to keep strong bold
-
13 Jul 2009 @ 16.54 its not the way it looks on screen that would be the problem mate, its the way search engines read it.. using <em> on something ( or any tag for that matter ) just to style it can have an impact on seo.. its called semantic coding
...
-
14 Jul 2009 @ 09.18 Yep I would totally agree with that.
Glynn, this is semantic coding, using the right tag to emphasis a point within the sentence. I don''t think Jason is saying to use this to fool the search engines, but there is no hard and fast rule to say that <em> has to be italicised or cannot be styled to your own website look and feel.
As with everything, as long as you don't overdo it and it is done within the correct structural markup, I don't think this is an issue.
Similar Threads
-
styling empty p tags
By sudhakararaog in forum HTML & CSSReplies: 4Last Post: 11 Jan 2013, @ 12.41 -
Styling the Menu/NavBar
By Wrams in forum HTML & CSSReplies: 21Last Post: 6 Dec 2011, @ 13.01 -
styling table cell
By sudhakararaog in forum HTML & CSSReplies: 2Last Post: 13 Jun 2011, @ 08.46 -
styling iframe
By sudhakararaog in forum HTML & CSSReplies: 1Last Post: 7 Dec 2010, @ 01.38 -
styling table rows inside a div
By sudhakararaog in forum HTML & CSSReplies: 3Last Post: 6 Oct 2009, @ 12.50



LinkBack URL
About LinkBacks













Displaying Search Results
Agree with you.... Generally, we don't have control over display...