CSS question regarding indents for <p>

Perseus

Registered
Just wondering if there was a way to have all lines of my paragraph indented 20 px instead of just the first line. Here is what I used:

<style type="text/css">
p.increase
{
line-height: 20px;
text-indent: 20px
}
...etc
<p class="increase"> etc etc etc
...etc
 
you might want to use a margin, IE on the PC gets pissy with, well everything but especially padding.
 
IE only has issues with padding when a specific width is applied on the element. It incorrectly determines the width then (aka. The Box Model Bug).

Correct:
150px (width) + 20px (right & left padding) + 2px (both borders) = 192px

IE Way:
150px (width) + 20px (right & left padding) + 2px (both borders) = 150px

Voodoo Arithmetic, huh? <G>
 
great explanation mdnky!
I hadn't known that before (but have lost numerous hairs from my head trying to figure friggin IE out).

soon (in my perfect view of the world) Safari and FireFox will take over the world and leave IE rotting as it always has...
 
I thought IE screwed the padding all the time. I've only been doing xhtml/css for a couple of weeks and already have a (more) bitter hatred of it.

And the worse thing is it'll stay at the top for a very long time, our IT department at work is being outsourced (the dimmest thing ever), so I asked the Project Manager if they'd install Firefox on all the comps, he didn't know what it was, and couldn't work a powerpoint presentation......
 
I'm an old timer from the pre-CSS days... So my first instinct is always to use lots of tables for formatting.

You can say what you want about this, but I have to say it is a lot less prone to browser-specific quirks.
 
Stick around with XHTML/CSS long enough and you'll hate IE so much it won't be funny.

The biggest issue is the box model bug above. There's some other nasty issues, but in general it's not very hard to get pages to work nicely among IE5+ Win versions. IE5 Mac has some of it's own unique issues, mostly with CSS 2 stuff. There is a 'box model hack' for Win-IE if you absolutely have to use padding and widths...it basically passes a fake width to IE (152px) then through a parsing error (hides the correct width from IE) passes the correct width to the behaved browsers. I prefer to stay hack free as much as possible, so I rarely use it.

TommyWillB, I started out programming HTML back on a C64 (300baud modem!)...old timer enough for ya? In the mid 90's I was still using a Unix Shell dial-in account, even though I had access for the new fangled SLIP/PPP method. Couldn't stand the new internet...was stuck in Lynx browsing, Pine for e-mails, and IRC via telnet. Amazing the change 10 years will bring about. 300baud vs. 3mbps ADSL <G>.

I gave up the tables for layout for numerous reasons. One of the biggest was due to the ease of updating and proper handling of the pages in the oldest of browsers and devices (PDAs, Cell Phones, etc.) which are becomming more popular. Also like being able to change the layout without having to touch the HTML code, or provide alternative layouts which don't require complete recodes.

The biggest reason is my distaste for hacks. Using tables for layout is the greatest hack of all time in web design. They were never meant for that purpose. It was a revolution, sure...but it's days have come. In 2 years or so you'll likely see very few professional designers still using tables in that manner. Those who do will probably be the unemployed ones. I have way too many bills for that to happen <G>.
 
Unfortunately the situation isn't going to get any better for those of us using XHTML and more specifically CSS. Microsoft aren't going to make any "developmental" (read: features/standards compatibility) updates until longhorn. that's at least 18 months away, probably closer to 2 1/2 years.
 
mdnky said:
TommyWillB, I started out programming HTML back on a C64 (300baud modem!)...old timer enough for ya? In the mid 90's I was still using a Unix Shell dial-in account, even though I had access for the new fangled SLIP/PPP method. Couldn't stand the new internet...was stuck in Lynx browsing, Pine for e-mails, and IRC via telnet. Amazing the change 10 years will bring about. 300baud vs. 3mbps ADSL <G>.
Cool... I had a friend with a 300 baud modem on his Atari. Was yours one of the cradel type that you put the phone receiver into?
mdnky said:
The biggest reason is my distaste for hacks. Using tables for layout is the greatest hack of all time in web design.
Hi! My name is TommyWillB and I'm a hack-aholic. I've been a hack-aholic as long as I can remember, but I've come here today as the first step in admiting I have a problem.
:eek:
mdnky said:
Those who do will probably be the unemployed ones.
...or they'll become managers who don't actually do much hands-on coding any more.
 
No, we were lucky enough to get the new fangled one with an actual plug. I knew someone who use the old cradle style, big pain in the behind.

TommyWillB said:
...or they'll become managers who don't actually do much hands-on coding any more.

Yea...wouldn't surprise me one bit.
 
TommyWillB said:
Cool... I had a friend with a 300 baud modem on his Atari. Was yours one of the cradel type that you put the phone receiver into?

Heh, I had one of those for a very short time. It was definitely a pain to use.

I'm a not-quite-as-oldtimer using HTML (started somewhere 'round 94-95), and I mostly use XHTML and CSS as well now. Though I'll still use a table if I want to have more than one column... doing that is a major pain with CSS and have it actually display correctly in the different browsers.
 
mdnky,

Do you know of any good tutorials that exist for people wanting to learn CSS based layout? I've tinkered some, but haven't had much free time to really look into it. How is the browsers support for it? The last time I tried it, I got the page to render in the browser properly, but when I tried printing the page, all the elements came out stacked on top of each other.
 
Back
Top