|
|
|
|
Thread title: Is it just me or.. |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
08-25-2005, 04:55 PM
|
#1
|
Status: Member
Join date: Jan 2005
Location: Manchester
Expertise: Design
Software: TextEdit
Posts: 1,009
|
Is it just me or..
Is using too much different css stuff in a single class / id the wrong way to do things.?
I might just be being daft.. but when I cram loads of stuff into a class I start to think thats not the right way to do things..
e.g.
Code:
#header-navigation { width: 100%; height: 14px; background-image: url(images/navbar.gif); font: 10px verdana; padding: 6px; border: 1px solid #6f8fa7; border-left-width: 0px; color: #ffffff; }
|
|
08-25-2005, 05:06 PM
|
#2
|
Status: I love this place
Join date: Apr 2005
Location: Canada
Expertise:
Software:
Posts: 723
|
In my opinion if you need that much then its the right way. Although I am not that experienced in CSS. There probably are better/easier ways.
|
|
08-25-2005, 05:39 PM
|
#3
|
Status: I'm new around here
Join date: Aug 2005
Location: UK
Expertise:
Software:
Posts: 23
|
some elements do require a lot of definition, other elements require less
If you remeber that all the elements within a container inherit the style from that container then you can avoid a lot of repetition.
|
|
08-25-2005, 06:18 PM
|
#4
|
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
Posts: 2,246
|
it's you:
Code:
from my css file
h2 {
width: 241px;
height: 16px;
background: #C6C6C6;
border-bottom: 1px solid #FFFFFF;
margin: 0;
padding: 3px 0 0 5px;
font-size: 1.1em;
text-transform: uppercase;
color: #616161;
}
|
|
08-27-2005, 06:17 AM
|
#5
|
Status: Simply to simplify
Join date: Apr 2005
Location: Foxton, Manawatu, New Zealand
Expertise:
Software:
Posts: 5,572
|
This is one of my snippets:
body {
font-family: "palatino linotype", "book antiqua", georgia, serif;
font-size: 1em;
color: #555753;
background: #fff;
margin: 0;
padding: 0;
font-style: italic;
letter-spacing: .025em;
line-height: 1.5em;
}
It is the right way to do it, cram as much in as possible, it saves creating other single selectors and saves space.
|
|
08-27-2005, 07:34 PM
|
#6
|
Status: Member
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 127
|
Originally Posted by JamesYooKay
Is using too much different css stuff in a single class / id the wrong way to do things.?
I might just be being daft.. but when I cram loads of stuff into a class I start to think thats not the right way to do things..
e.g.
Code:
#header-navigation { width: 100%; height: 14px; background-image: url(images/navbar.gif); font: 10px verdana; padding: 6px; border: 1px solid #6f8fa7; border-left-width: 0px; color: #ffffff; }
|
That really isn't that much. Boy you should see some of the classes I create, lol .
|
|
08-27-2005, 11:17 PM
|
#7
|
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 2,694
|
It can never be to long!
Code:
body{
background-image: url(style_images/aanz_1/bg.jpg);
background-repeat: repeat-x;
background-color: #D9D5CC;
color: #222;
font-family: Verdana, Tahoma, Arial, Trebuchet MS, Sans-Serif, Georgia, Courier, Times New Roman, Serif;
font-size: 11px;
line-height: 135%;
margin: 0;
padding: 0; /* required for Opera to have 0 margin */
text-align: center; /* centers board in MSIE */
}
|
|
08-28-2005, 11:12 PM
|
#8
|
Status: I'm new around here
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 5
|
this forum page is not showing well in IE6 on windowsxp.
posts with code are going out of the main borders!! I thought you should know
|
|
08-29-2005, 01:19 AM
|
#9
|
Status: I love this place
Join date: Mar 2005
Location:
Expertise:
Software:
Posts: 640
|
With CSS theres not much of a right way and wrong way. The stress is to keep the XHTML as clean as possible and then go into CSS and style it as best you can without creating more <div>'s etc in the XHTML. So yes cram as much as you can in.
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|