Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1418 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Terrible CSS!

Thread title: Terrible CSS!
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
03-12-2007, 04:30 AM
#1
Awesome is offline Awesome
Awesome's Avatar
Status: Pastafarian
Join date: May 2006
Location: Duct Taped to your Ceiling
Expertise:
Software:
 
Posts: 3,440
iTrader: 26 / 93%
 

Awesome is on a distinguished road

  Old  Terrible CSS!

Code:
center_details_subskin {

		background-image: url(../images/brown_corner.gif);

		background-repeat: no-repeat;

		height: 55px;

		padding-left: 218px;

		width: 550px;

}



#container_subskin {

		background: #ffffff url(../images/left_bg.gif);

		background-repeat: repeat-y;
		margin-top: -2px;
		overflow: hidden;

		padding-left: 54px;   /* LC width */

		padding-right: 40px;   /* RC width */

		position: relative;

}



#container_subskin .column {

		float: left;

		margin-bottom: -10000px;  /* X */

		padding-bottom: 10010px;  /* X + padding-bottom */

		position: relative;

		top: 2px;

}



#text_offset

{

padding-bottom: 50px;

}



#left_subskin {

		background: url(../images/left_border.gif) no-repeat;

		background-repeat: repeat-y;

		background-color: #FFF;

		margin-left: -100%;

		left: 40px;          /* LC width */

		width: 54px;          /* LC width */

}



#container_subskin > #left_subskin {

        left: -54px;          /* -(LC fullwidth + CC padding) */

}



.sub_text_offset_clear {

		clear: both;

		padding: 18px 0 8px 0;

}
Have you ever seen such crap? Negative margin this, absolute position that. Terrible.

Grrrr. I hate fixing other peoples stupidity. It's a friggin simple layout too.

03-12-2007, 04:33 AM
#2
Garrett is offline Garrett
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
 
Posts: 2,694
iTrader: 11 / 100%
 

Garrett is on a distinguished road

Send a message via MSN to Garrett

  Old

Originally Posted by Blue Ire View Post
Code:
center_details_subskin {

		background-image: url(../images/brown_corner.gif);

		background-repeat: no-repeat;

		height: 55px;

		padding-left: 218px;

		width: 550px;

}



#container_subskin {

		background: #ffffff url(../images/left_bg.gif);

		background-repeat: repeat-y;
		margin-top: -2px;
		overflow: hidden;

		padding-left: 54px;   /* LC width */

		padding-right: 40px;   /* RC width */

		position: relative;

}



#container_subskin .column {

		float: left;

		margin-bottom: -10000px;  /* X */

		padding-bottom: 10010px;  /* X + padding-bottom */

		position: relative;

		top: 2px;

}



#text_offset

{

padding-bottom: 50px;

}



#left_subskin {

		background: url(../images/left_border.gif) no-repeat;

		background-repeat: repeat-y;

		background-color: #FFF;

		margin-left: -100%;

		left: 40px;          /* LC width */

		width: 54px;          /* LC width */

}



#container_subskin > #left_subskin {

        left: -54px;          /* -(LC fullwidth + CC padding) */

}



.sub_text_offset_clear {

		clear: both;

		padding: 18px 0 8px 0;

}
Have you ever seen such crap? Negative margin this, absolute position that. Terrible.

Grrrr. I hate fixing other peoples stupidity. It's a friggin simple layout too.
#container_subskin .column, is just add 10 pixels of padding on the bottom all together. HAHA

03-12-2007, 05:23 AM
#3
damien is offline damien
Status: On Vacation
Join date: Aug 2006
Location:
Expertise:
Software:
 
Posts: 873
iTrader: 3 / 80%
 

damien is on a distinguished road

Send a message via MSN to damien

  Old

I am sure both of you wrote perfect code the first day you learned.

03-12-2007, 08:31 AM
#4
daz is offline daz
Status: I love this place
Join date: Jun 2005
Location: UK
Expertise:
Software:
 
Posts: 562
iTrader: 5 / 100%
 

daz is on a distinguished road

Send a message via MSN to daz

  Old

I hate working with other people's code. I'd rather just code it from scratch, lol.

03-12-2007, 10:25 AM
#5
Sulcalibur is offline Sulcalibur
Sulcalibur's Avatar
Status: I love this place
Join date: Jan 2005
Location: London
Expertise:
Software:
 
Posts: 608
iTrader: 4 / 100%
 

Sulcalibur is on a distinguished road

Send a message via MSN to Sulcalibur

  Old

Originally Posted by damien11 View Post
I am sure both of you wrote perfect code the first day you learned.
Thats what I was just think. They both came straight out of the womb riding a bike (with no hands).

03-12-2007, 02:22 PM
#6
jabberwocky is offline jabberwocky
jabberwocky's Avatar
Status: Member
Join date: Oct 2005
Location: Calgary, Alberta, Canada
Expertise:
Software:
 
Posts: 278
iTrader: 0 / 0%
 

jabberwocky is on a distinguished road

  Old

nerd elitest. wow. guess they gots mad skillz at minesweeper too.

03-12-2007, 03:29 PM
#7
Andrew R is offline Andrew R
Status: Request a custom title
Join date: Dec 2005
Location: Arizona
Expertise:
Software:
 
Posts: 5,200
iTrader: 17 / 95%
 

Andrew R is on a distinguished road

  Old

Yeah, that's pretty bad. Adding on to what daz said:

I just bought a site from Garrett, and the coding is great, (except one small error which is an easy fix), but I can't stand with working with other peoples code so I'm just going to be recoding it from scratch, so I don't go crazy.

03-12-2007, 04:06 PM
#8
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

It's certainly not the most beautiful CSS I've ever seen, but if you're going to highlight bad code then at least highlight what is bad and how it could be improved (in your own experience). Then we can all discuss it, as experts in the field.

Maybe I'm just blind, but I see no absolute positioning whatsoever and there's nothing wrong with negative margins when used, as is always the case, appropriately. It just seems like the code of an inexperienced (read: they'll improve with time) person is all. Nothing major. At least you're getting paid to fix the god awful mess they made, right?

03-12-2007, 04:51 PM
#9
Awesome is offline Awesome
Awesome's Avatar
Status: Pastafarian
Join date: May 2006
Location: Duct Taped to your Ceiling
Expertise:
Software:
 
Posts: 3,440
iTrader: 26 / 93%
 

Awesome is on a distinguished road

  Old

Originally Posted by damien11 View Post
I am sure both of you wrote perfect code the first day you learned.
I don't sell services that I can't provide competently If you are learning, you have no business offering "Professional Services".

03-12-2007, 05:53 PM
#10
derek lapp is offline derek lapp
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
 
Posts: 2,246
iTrader: 0 / 0%
 

derek lapp is on a distinguished road

  Old

exactly.

there's almost never a need for negative margins. i've used negative margins, and positioning for practical reasons, but they're very few and far between.

margin-left: -100%;
and

margin-bottom: -10000px; /* X */
padding-bottom: 10010px; /* X + padding-bottom */

are just ridiculous.

Closed Thread  
Page 1 of 2 1 2 >


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed