I think I have finally worked out SEO....

Discussion in 'HTML & Website Design' started by GameOver, Apr 25, 2008.

  1. #1
    I have been redesigning free templates however I think I am nearly ready to create my own using notepad.

    The thing I am not clear on is <div>. To get the desired width do you just make one for content (id="content") and one for sidebar (id="sidebar") and use CSS to enter the width of each?

    Also in the html, would the above look like this:
    or this:


    And are you meant to put a <div> around everything? (e.g. <div id="container">)

    I would appreciate any help.

    Thanks
     
    GameOver, Apr 25, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    It all depends on how you style the div (set the width,etc.). You can do this:

    
    <div id="main">
    	<div id="LeftContent">
    		main site content
    	</div>
    	<div id="SideBar">
    		Left sidebar content
    	</div>
    </div>
    
    #main { width: 770px; }
    #LeftContent { width: 500px; }
    #SideBar { width: 270px; }
    
    Code (markup):
    This will make the whole page locked in at 770px (small enough to not scroll in 800 resolution browsers), and it will define your main left-side content area with a slim 270-pixel width sidebar.
     
    itcn, Apr 26, 2008 IP