negative margins and padding
- Started
- Last post
- 16 Responses
- dbloc
do you use them?
- kona0
yep all the time
- vaxorcist0
kludge, but done quite a bit....
- fugged0
negative margins, ocassionaly. negative padding, never.
- dbloc0
I guess that's what I meant...I've never used negative padding either
- dbloc0
is it considered bad practice?
- dbloc0
Negative margins can be really useful when used correctly but can are often avoided because they’re seen as a hack or work around to other CSS problems.
true.
- vaxorcist0
can sometimes cause havoc on iphones and androids
- oktalk0
Negative padding probably won't render in any browser. You can check the W3C specs: "Unlike margin properties, values for padding values cannot be negative...."
http://www.w3.org/TR/CSS2/box.ht…Negative margins is perfectly acceptable.
- plash0
this must be a web thing b/c ive never heard of a negative margin for off-set..
- dbloc0
yeah...talking CSS not print
- ********0
quite simply, negative anything is lazy coding
- Fax_Benson0
you use +, why not -?
- ETM0
Negative margins are W3C valid and not lazy 'coding'. Like anything, it comes down to proper usage/implementation. That can be said of almost anything.
- validity and needing to slide things negative are different, it's lazy********
- So you know better than people who develop the standards. Awesome.ETM
- validity and needing to slide things negative are different, it's lazy
- dbloc0
definitely used a lot to hide text for SEO
- why not just hiding it?********
- because it's more likely to get flagged as blackhat seo.fugged
- both are bad practices********
- no, they're not. they can be used poorly and often are. but, they are not bad practice.fugged
- if google catches you hiding content for seo, you're blacklisted********
- What is you use script to hide a div onLoad. A div that contains the entire internet, with proper H1-4s and everything ?mikotondria3
- *what IF...mikotondria3
- "A div that contains the entire internet" That must be one big div! :)fugged
- why not just hiding it?