WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Graphics & Design Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-27-2005, 11:40 PM
WebProWorld Member
 

Join Date: Jun 2005
Posts: 77
bobby9101 RepRank 0
Default Content and Sidebar Divs

I have created a page.
I hvae a sidebar which is a div.
the problem is how do i get the other main content next to it?
it shows up underneath.

http://img29.imageshack.us/img29/9416/newpicture6jg.jpg
I want the pictures next to the siderbar.

here is the code for that
Code:
<html><head>
<style type= "text/css">
h1 {color: #C80000}
h1 {text-align: center}
i {color: teal}
a {color: salmon}				
	body {background-color: #380000}
#linkstable align="left"{background-color: #330000; margin:0 auto;width:18%;}
</style></head></body>
<div id="linkstable">

<h3>Home</h3>

<h3><a href"=contact-us.htm">Contact Us</a></h3>

<h2>Inventory:</h2>

<h3><a href"=tables.htm">Tables</a></h3>

<h3><a href"=seating.htm">Seating</a></h3>

</div>
<a>
[img]monitor.gif[/img]</a>
<a>
[img]camcorder.jpg[/img]</a>
<a>
[img]keyboard.jpg[/img]</a>
</body>
</html>
Reply With Quote
  #2 (permalink)  
Old 07-28-2005, 05:14 AM
MuNKyonline's Avatar
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Suffolk, England
Posts: 784
MuNKyonline RepRank 2
Default

Put it in two table columns? Then put the links table in one and the main content in the other.
Reply With Quote
  #3 (permalink)  
Old 07-28-2005, 05:36 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 829
speed RepRank 1
Default

Quote:
Originally Posted by MuNKy
Put it in two table columns? Then put the links table in one and the main content in the other.
Arrgh! He's trying CSS so why go back to tables?

The most basic 2 column layout is:

CSS:
Code:
#sidebar { background-color: #CC99FF; width: 300px; float: left; }
#main { float: left; padding: 1em; }
.clear { clear: both; }
HTML:
Code:
<body>
    <div id="sidebar">
        <ul>[*]Item 1[*]Item 2[*]Item 3[*]Item 4[/list]    </div>
    <div id="main">
        

The body text</p>
    </div>
    <div class="clear"></div>
    

Footer</p>
</body>
I've included a footer for good measure, if you want to get more complex have a look at http://www.alistapart.com/articles/fauxcolumns/

It's possible to build on these basics to build 3 or 4 column layouts such as http://www.cut4cloth.co.uk without tables.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory : Web Directory Script
Reply With Quote
  #4 (permalink)  
Old 07-28-2005, 06:08 AM
MuNKyonline's Avatar
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Suffolk, England
Posts: 784
MuNKyonline RepRank 2
Default

Just thought that might be easier that's all. Don't really know how to use css that well for positioning - something I should learn too!
Reply With Quote
  #5 (permalink)  
Old 07-28-2005, 10:07 AM
WebProWorld Member
 

Join Date: Jun 2005
Posts: 77
bobby9101 RepRank 0
Default

I tried that.
I still have the sidebar in the right place.
but the main off to the bottom.
I need to slide that main text up so it is next to the sidebar
Reply With Quote
  #6 (permalink)  
Old 07-28-2005, 10:16 AM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 

Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,217
ADAM Web Design RepRank 0
Default

1. Try taking the padding out of your #main div (if you used speed's suggestion.) Sometimes that can throw things.

If you need padding, what you can do is create a nested div (a div inside a div) containing that padding. I've done this quite a bit, and it hasn't steered me wrong yet.

2. Try style="float: left;" for your images. That should shift them into two rows if they have to.

From there, mess around with it.
Reply With Quote
  #7 (permalink)  
Old 08-08-2005, 07:30 AM
WebProWorld Member
 

Join Date: Aug 2005
Location: Florida
Posts: 98
WebMasterKrames RepRank 0
Default

Quote:
Originally Posted by MuNKy
Just thought that might be easier that's all. Don't really know how to use css that well for positioning - something I should learn too!

I'm very familiar with CSS and let me tell you it's not worth it to sit around and try to make tabular content using 100% CSS. Web browsers will always be able to read tables, anyone who sits around coding tabular content in CSS when they could get the exact same effect in less time either is getting paid by the hour or is just anal and likes looking at code for long periods of time.
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum
Tags: , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0