Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Mar 2012
    Posts
    168
    Thanks
    5
    Thanked 11 Times in 11 Posts

    Two beginner questions

    1. Hey everyone I've been doing css and html for less than a week and I'm probably a pro at keeping code clean and organized (indents etc) but I can see how complicated websites can get cramped. My first question is, are there any coding 'rules' or best practices that tell you to limit your number of divs. I'm finding divs extremely useful and I'm using them for 'everything.'

    Ex: I have a header div and inside I have logo div, to float left, a banner div, and a login div. Then inside the login div I have a log in button div.

    What does everyone think, in general. Can there be too many divs?

    2. Also, along with divs, I find myself overriding previous properties of 'upper level' (if that's a term?) divs. Is there a way to, per say, reset all of the earlier declarations once I'm in the bottom level div so I can clean up code a bit?

    Any other beginner best practices, shoot!

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    What does everyone think, in general. Can there be too many divs?
    YES! Read about divitis here.

    Not sure I'm following you on your second question.
    Teed

  • #3
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts

  • #4
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    9
    Thanks
    0
    Thanked 1 Time in 1 Post
    its happens when you star working to HTML & CSS you better have go through to any good tutorials before started hands on it i think w3schools.com is the best for the beginners

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    Quote Originally Posted by gilljhonson View Post
    i think w3schools.com is the best for the beginners
    No, it is not. I’d suggest HTMLDog over W3Schools.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •