CSS question
- Started
- Last post
- 16 Responses
- CygnusZero4
Stuck on something that is probably simple. I have a p tag, and when I close it at the end of a paragraph there is a large amount of space between it and the next p tag. I tried messing with padding/margin-bottom but it doesn't effect it.
p {
color: #444444;
font-size: 11px;
line-height:16px;
}
- ********0
Have you done a Reset all padding, margin 0
- Yep that worked. I'm an idiot.CygnusZero4
- <Jaline
- CSS Reset does work wonders. Although I was checking IE 8.0 today, and I had to specifically write something for that one. Stupid.Jaline
- ********0
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, del, dfn, font, img, ins, kbd, q, s, samp, strike, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
border: 0;
outline: 0;
padding: 0;- Sweet, thanks man.CygnusZero4
- Your welcome, I have had lots of help from QBN members on HTML, CSS over the years, glad I could help.********
- vaxorcist0
css reset has saved my sanity over and over....
- alicetheblue0
Question:
Should line-height be in ems?just wondering
- EM ALL THE THINGS
FYI: 1em = 16 px******** - well EMs are relative to the parent's font's size. so that is true until you have children with different font-sizeBabySnakes
- EM ALL THE THINGS
- CygnusZero40
Ok another dev question. Obviously I'm not much of a developer. I do it here and there when I have to.
I have a table I'm trying to put a 100% height attribute on, but it's not working. I tried putting height="100%" on the table tag, as well as the tr and td tags, and it doesn't work.
Is it just not possible, or would maybe an inline style work?
- By the way I realized the table is 2 rows, only bottom one needs to stretch to 100%CygnusZero4
- Well inline styles arent working on the tr or td tags.CygnusZero4
- ukit20
"1em = 16 px"
Um....
- are you mad about the space? because it's right.********
- By default maybe, but most people set the pixel size manually at the beginning of their CSSukit2
- i gave the info for reference only,********
- imo, it's a hack tactic, these reset things are not necessary, or so says the last 10 years of my professional life... IMO********
- are you mad about the space? because it's right.
- alicetheblue0
Um ... so it doesn't matter if its ems or pixels for line-height?
- vaxorcist0
the ems or pixels thing is a nuclear war amongst some designers and developers.....
without taking sides, I'd say:
1. if you're going from a PSD to a web layout and you want pixel-perfect sameness, use pixels
2. if you're going for a resizable layout, liquid layout and/or trying to make something really re-usable on various devices, you can use ems.
ems allow for relative sizing, which can be useful if you have bifocal users who enlarge the text, the whole layout can change accordingly... but note that this may freak out designers who feel like their work has just been vandalized....
- given the 1em to 16px conversion, pixel perfection is better accomplished through em... WAR ON!!!!********
- I always have more issues with em though, especially when it comes to browser compatibility. So I use both.Jaline
- me too.. ems have caused a few all-night browser testing and debugging sessions from hell for mevaxorcist
- jaline - would you just have line-hight: 1em 16px; or a declaration for each?alicetheblue
- i actually prefer (and notice) the difference em has on a site over px. em fo lyf********
- what if you want 15 pixels?mantrakid
- given the 1em to 16px conversion, pixel perfection is better accomplished through em... WAR ON!!!!
- CygnusZero40
Anyone know anything about my table 100% height problem I mentioned a couple posts above? I'm googling this and most just say either put a height="100%" on the table, tr, or td tags, or do an inline style, neither of which are working.
- ********0
- Jaline0
Can you post the code?
Use http://pastebin.com if needed.
- uan0
100% is 100% of the parent element...so maybe your table is nested in some div with some height defined?
- ********0
- ********0
- alicetheblue0
while we are on the CSS thingy. Just came across this. Brilliant!
http://instacss.com/#css/
- Gordy220
For 100% height with divs and stuff, I did this the other day:
https://www.complinet.com/profil…Feel free to pick apart the CSS/HTML to get what you need

