text-indent property and Mozilla

  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

Does mozilla not support this property? I have it in my style sheet, but it's not showing up in mozilla browsers. here's the HTML:

Code: [ Select ]
<span class="bold indent20px">My text</span>


There's 2 classes there, one to bold the text, one to indent it 20 px, but the indent is not present in mozilla browsers. I thought maybe it was the fact i was calling 2 classes, but I added a class to turn the text blue, and that worked.

Mark
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Check out Topstyle Pro. There is a trial version available. If you like it, buy it. It will tell you very quickly what is or is not supported in most common browsers.
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

<span class="bold indent20px">My text</span>

Any change the above was not a typo? Class is an identifier. What you appear to be doing is defining a style in the tag itself. In that cause, use style="bold; text-indent: 20px". Also, be sure you use the correct properties (i.e. text-indent, not indent).

Good Luck
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

I am using top style pro. this is why i find it confusing, because the text-indent property is listed there. It's just not showing up in the browser.

Re: rjmthezonenet -- nope, not a typo. i hear what you're saying, but i don't want to do an inline style, i want to reference an external style sheet. i have a class called .bold, and a class called .indent20px (both do what they sound like). I want to apply both classes from my external style sheet to the selected text, but for some reason the class .indent20px isn't being applied. I wasn't sure how to do it, but after doing a search on yahoo, it seemed the way to apply multiple classes was to list them like a normal class with a single space between them. here's an example of my style sheet:


Code: [ Select ]
.bold {
    font-weight: bold;
}

.indent20px{
    text-indent: 20px;
}
  1. .bold {
  2.     font-weight: bold;
  3. }
  4. .indent20px{
  5.     text-indent: 20px;
  6. }



w3schools doesn't say anything about it not being supported in Mozilla browsers, but I can't figure out why it's not showing up.

Mark
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

First time I've seen multiple classes...

...what happens when you do this?

<span class="indent20px bold">My text</span>
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Assuming its a bug, can you tolerate doing this?

Code: [ Select ]
.bold {
  font-weight: bold;
}

.indent20px{
  text-indent: 20px;
}

.boldindent20px{
  font-weight: bold;
  text-indent: 20px;
}
  1. .bold {
  2.   font-weight: bold;
  3. }
  4. .indent20px{
  5.   text-indent: 20px;
  6. }
  7. .boldindent20px{
  8.   font-weight: bold;
  9.   text-indent: 20px;
  10. }
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

rjmthezonenet wrote:
First time I've seen multiple classes...

...what happens when you do this?

<span class="indent20px bold">My text</span>


well, i hadn't tried that, but what i had done was this:

Code: [ Select ]
<span class="bold indent20px color_blue">My text</span>


Where .color_blue turns the text color blue. The bold and the blue (do you know how badly i want to say the bold and the blue-tiful? :lol: ) are applied, but not the indent.

Mark
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

If I'm not mistaken text indent only works in block elements. I think Mozilla may be interpreting it correctly. I didn't check the w3c on that, but that's what I seem to recall. To test the theory, try it in <p> vs. <span> and see what happens.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Never mind - skip the test. w3c did one for you. Exactly what you are after, and works in Firefox. It is block elements:

http://www.w3.org/Style/CSS/Test/CSS1/c ... est547.htm
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

ATNO! Brilliant. lol, span is in-line. <div> would'a worked. Go figure. :-)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

*smiles -- Yep. I do apologize though -- I saw you guys struggling with this earlier and was sure I knew the answer but was too busy to actually post and confirm it until tonight. Nice to see ya working hard on it though!
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

ATNO/TW wrote:
*smiles -- Yep. I do apologize though -- I saw you guys struggling with this earlier and was sure I knew the answer but was too busy to actually post and confirm it until tonight. Nice to see ya working hard on it though!


No need to apologize dude! Trust me, you've defenitely shared more than your fair share of knowledge with me, and I'm sure everyone else here too. I imagine you have a pretty full life outside of ozzu to take care of too :D Thanks for the help!

Mark
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

y'know, it's funny actually, because i had made a point of reading up on the property at w3 schools : http://www.w3schools.com/css/pr_text_text-indent.asp

unfortunately, they don't explicitly say it only works with block elements, and to this day I still think of the <p> tag as an inline element rather than a block element, which was the example they used. :lol:


mark
  • gilray4
  • Novice
  • Novice
  • gilray4
  • Posts: 17
  • Loc: Hawai'i

Post 3+ Months Ago

ATNO/TW wrote:
If I'm not mistaken text indent only works in block elements. I think Mozilla may be interpreting it correctly. I didn't check the w3c on that, but that's what I seem to recall. To test the theory, try it in <p> vs. <span> and see what happens.

Post Information

  • Total Posts in this topic: 14 posts
  • Users browsing this forum: No registered users and 55 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.