Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-30-2009, 03:47 PM   #1
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
OK, here's a little CSS trick

so I really got tired of fixing some CSS sheets with HORRORS (they're not even errors), therefore here's a tip for you guys to save bandwidth, make spacing coherent and clear floats all at once while saving time.

First, for those that still don't know (the vast majority for what I see), you should do something at the top of every stylesheet: reset everything. I won't go further on that since there are gazillions of tutorials on it.

So while you're resetting everything, add this:

Code:
hr{clear:both; visibility:hidden; margin:10px 0;}

/* modify the margin to whatever you want */

Now, every time you need some spacing or clear floats, instead of redefining or adding elements, simply add the <hr/> tag and that's it

of course, in the event that you need a real <hr> simply define it like <hr class="whatever" />, but chances are 99 times out of 100 you won't need the hr tag. Hell, if I remember right the last time I used the hr tag was in 1998!

Anyway, hope you like it
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 03:56 PM   #2
JD
Too lazy to set a custom title
 
Industry Role:
Join Date: Sep 2003
Posts: 22,651
nifty trick and yeah i agree on the 1998 thing about HR's

I do the same thing with a clear class like

Code:
.clear {clear:both;}
and use it on page with
Code:
<div class="clear" style="height:xxpx;"></div>
different strokes for different folks :D
JD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 04:01 PM   #3
CS-Jay
Confirmed User
 
CS-Jay's Avatar
 
Join Date: Oct 2003
Location: Command Central, West Palm Beach, Fl
Posts: 1,794
I use the JD method, but I like the hr idea too.
__________________
I do stuff - aIm CS_Jay_D
CS-Jay is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 04:19 PM   #4
AIbenjamink
Confirmed User
 
AIbenjamink's Avatar
 
Industry Role:
Join Date: Jan 2009
Posts: 420
Quote:
Originally Posted by JD View Post

Code:
.clear {clear:both;}
Code:
<div class="clear" style="height:xxpx;"></div>
__________________
Benjamin : [email protected] : 405-243-447 : www.AdultInterface.com

AIbenjamink is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 04:24 PM   #5
HighEnergy
So Fucking Banned
 
Join Date: Apr 2007
Posts: 806
Quote:
Originally Posted by JD View Post
nifty trick and yeah i agree on the 1998 thing about HR's

I do the same thing with a clear class like

Code:
.clear {clear:both;}
and use it on page with
Code:
<div class="clear" style="height:xxpx;"></div>
different strokes for different folks :D
All's well that ends well .... but ....
1) for predictable cross-browser results call every variable at the beginning of the style sheet.

ie:
font-family
font-size
font-style
line-height
margin
padding
p margin
p padding
div margin
div padding
i margin
i padding
em margin
em padding
etc
etc
etc
Just obey cascading for the best results.

I keep all base (global) styling in a 'base' file to be read 1st.
Then unique page/site styling in a unique CSS file to be read 2nd.



...
HighEnergy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 04:32 PM   #6
RyuLion
 
RyuLion's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: San Diego
Posts: 32,174
guess what this does?

#index_table IMG:hover {
BORDER-RIGHT: #f09 2px ridge;
border-top: #f09 2px ridge;
border-bottom: #f09 2px ridge;
border-left: #f09 2px ridge;
FLOAT: left; MARGIN: 0px 5px 0px 0px;
__________________

Adult Biz Consultant A tech head since 1995
RyuLion is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 04:39 PM   #7
HighEnergy
So Fucking Banned
 
Join Date: Apr 2007
Posts: 806
Quote:
Originally Posted by RyuLion View Post
guess what this does?

#index_table IMG:hover {
BORDER-RIGHT: #f09 2px ridge;
border-top: #f09 2px ridge;
border-bottom: #f09 2px ridge;
border-left: #f09 2px ridge;
FLOAT: left; MARGIN: 0px 5px 0px 0px;
It doesn't do jack shit unless you have an element named index_table
HighEnergy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 05:11 PM   #8
StuartD
Sofa King Band
 
StuartD's Avatar
 
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
http://www.gfy.com/fucking-around-and-business-discussion/750159-css-please-share-post12733093.html
StuartD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 05:28 PM   #9
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
Yea what the fuck you posers!

StuartD invented CSS
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 06:31 PM   #10
Basic_man
Programming King Pin
 
Basic_man's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: Montreal
Posts: 27,360
I like the simplicity of your HR trick! I should start using it
__________________
UUGallery Builder - automated photo/video gallery plugin for Wordpress!
Stop looking! Checkout Naked Hosting, online since 1999 !
Basic_man is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 06:47 PM   #11
dallasnovelty
Confirmed User
 
dallasnovelty's Avatar
 
Industry Role:
Join Date: Aug 2009
Location: Dallas, TX
Posts: 1,056
Thanks for sharing your tips. I am just learning how to do all the css stuff.
__________________
| Dallas Novelty Blog | Facebook
dallasnovelty is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 09:02 PM   #12
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
Quote:
Originally Posted by JD View Post
nifty trick and yeah i agree on the 1998 thing about HR's

I do the same thing with a clear class like

Code:
.clear {clear:both;}
and use it on page with
Code:
<div class="clear" style="height:xxpx;"></div>
different strokes for different folks :D
yeah, but my solution is for lazy mofos like me who just want to type 5 chars


Quote:
Originally Posted by RyuLion View Post
guess what this does?

#index_table IMG:hover {
BORDER-RIGHT: #f09 2px ridge;
border-top: #f09 2px ridge;
border-bottom: #f09 2px ridge;
border-left: #f09 2px ridge;
FLOAT: left; MARGIN: 0px 5px 0px 0px;
any time a girl sees that code she feels an irresistible urge to get her ass bitten


nice thread indeed

Quote:
Originally Posted by Deej View Post
Yea what the fuck you posers!

StuartD invented CSS
yeah, but my thing is CZZ, which is only for l33t people
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 09:09 PM   #13
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
Quote:
Originally Posted by harvey View Post



yeah, but my thing is CZZ, which is only for l33t people
O i sees - Well you mis titled then

Keep up the good shit
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 09:24 PM   #14
Killswitch - BANNED FOR LIFE
Guest
 
Posts: n/a
Code:
.clearFix:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
}
.clearFix {
	display: inline-block;
}
/* start commented backslash hack \*/
* html .clearFix {
	height: 1%;
}
.clearFix {
	display: block;
}
/* close commented backslash hack */
*, html {
	margin: 0;
}
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 09:27 PM   #15
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
Code:
* {margin:0;padding:0;}
tops all...
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 09:28 PM   #16
calmlikeabomb
Confirmed User
 
calmlikeabomb's Avatar
 
Join Date: May 2004
Location: SW Palm Bay, Florida
Posts: 1,323
Here is another tip - minify your style sheets to save bandwidth:

http://code.google.com/p/minify/
__________________
subarus.
calmlikeabomb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-30-2009, 09:43 PM   #17
JD
Too lazy to set a custom title
 
Industry Role:
Join Date: Sep 2003
Posts: 22,651
Quote:
Originally Posted by Deej View Post
Code:
* {margin:0;padding:0;}
tops all...
lol
JD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.