Forums

  • # April 29, 2008 at 5:11 am

    Hi Guys,

    Lets say I have 2 different classes and I attach them to 2 seperate divs.

    Code:
    .class1 {}
    .class2 {}

    Now I want those 2 divs to float to left. Here comes to question, which technic do you prefer?

    Technic 1

    Code:
    .class1 {}
    .class2 {}

    class1, class2 {float:left}

    Technic 2

    Code:
    .floatL {float:left}

    .class1 {}
    .class2 {}

    Actually, since we have option to add more than one class to an html element, I rather prefer Technic 2. What is your opinion? Or what is your experience about this two technics?

    Best Regards

    # April 29, 2008 at 4:12 pm

    I see but I did not mean to declare a class for every single attribute, just for the very very common ones like float, but I got your points thank you very much for sharing your opinions.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag