|
|
|
|
| View previous topic :: View next topic |
| Author |
Message |
wordcross

|
Posted: Thu Apr 09, 2009 11:26 pm Post subject: 1 |
|
|
So recently I was writing code for a pretty straightforward text page which had different lines in different colors. Aside from the standard black text, there was also red, green, and blue text.
So, being that I'm only generally and not very technically versed in CSS, I just went about my business and did what I assumed worked from examples I found on w3schools.com.
Which led me to do this: (square brackets replace <> symbols because i don't know how the message board handles html script)
| Quote: |
...
[head]
[style type="text/css"]
red {color: #ff0000}
blue {color: #0000ff}
green {color: #008000}
[/style]
[/head]
... |
and then using the tags thusly:
| Quote: |
...
[red]Some text[/red]
[blue]Some other text[/blue]
[green]Some other other text[/green]
... |
And this seemed to be perfectly okay when seen in Firefox, Opera, Chrome, and even in Safari. However, IE didn't like that at all and just showed black text. I ended up doing this instead:
| Quote: |
...
[style type="text/css"]
p.red {color: #ff0000}
p.blue {color: #0000ff}
p.green {color: #008000}
[/style]
... |
and then invoking the classes in the [p] tag.
So aside from the fact that Internet Explorer delights in causing hardship for web programmers, is there a reason why making up tags is a bad idea?
Is there some other method of making up stuff that is more elegant than just attributing classes to a pre-existing tag?
Should I give up and leave this to people who aren't hopeless at understanding the nuances of css and html?
(If you're curious this is the page I was coding) _________________ Has anyone really been far even as decided to use even go want to do look more like? |
|
| Back to top |
|
 |
raekuul
Lives under a bridge & tells stories.
|
Posted: Fri Apr 10, 2009 12:26 am Post subject: 2 |
|
|
| If you use code tags, you should be able to put anything you need. |
|
| Back to top |
|
 |
wordcross

|
Posted: Fri Apr 10, 2009 2:08 am Post subject: 3 |
|
|
meaning what? put it where? like i have it now, only with "code" instead of "p" or some other way? I looked up the code tag but it doesn't do anything specifically that relates to this. _________________ Has anyone really been far even as decided to use even go want to do look more like? |
|
| Back to top |
|
 |
worm
unregistered
|
Posted: Fri Apr 10, 2009 2:59 am Post subject: 4 |
|
|
I figured he meant you wouldn't have to switch "[" for "<" if you use the GL's code tag.
the board can handle html code, though. It was kinda fun when it couldn't
See:
| Quote: |
<style type="text/css">
p.red {color: #ff0000}
p.blue {color: #0000ff}
p.green {color: #008000}
</style> |
|
|
| Back to top |
|
 |
wordcross

|
Posted: Fri Apr 10, 2009 3:08 am Post subject: 5 |
|
|
yeah, after i left my computer i was thinking about what the code tag does and I thought to myself "Oh hey, he was probably actually making an astute observation that I completely misinterpreted!"
sorry raekuul  _________________ Has anyone really been far even as decided to use even go want to do look more like? |
|
| Back to top |
|
 |
Lepton*
Guest
|
Posted: Fri Apr 10, 2009 9:36 am Post subject: 6 |
|
|
You could make each event on your page an instantiation of a css class, with each level denoted as a different subclass (title, place, date, etc). Then, you're a bit more flexible in the future if you want to change how the page looks.
Maybe the trouble is because of <span> tags?
On the other side of things, I think that I've been forced to use a ugly hack in order to get my content boxes to clear properly in Firefox (but it works as one would expect in IE). Site |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|