Positioning with css

This is a discussion on "Positioning with css" within the Web Page Design section. This forum, and the thread "Positioning with css are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 12th, 2005, 00:33
Hub Hub is offline
Junior Member
Join Date: Dec 2005
Location: Ipswich UK
Age: 57
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Please, help us to test new CSS Editor

I am OK at understanding a lot of what CSS is about and I can appreciate the advantages it offers if the need for change arises. The thing I can't get to grips with is how I start positioning the top of my page so that I have images on the left and right with text in the middle.

And from there how to I position my menu on the left with my main body on the right.

What also seems confusing is that a lot of the information I am finding was written some time ago which surely means some of the problems that existed with different browsers have now disappeared.

Can anyone give me a kick start on this positioning thing?
Reply With Quote

  #2 (permalink)  
Old Dec 12th, 2005, 10:13
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Please, help us to test new CSS Editor

is this an actual question...if so ill split the post for you n send it to css...
Reply With Quote
  #3 (permalink)  
Old Dec 12th, 2005, 11:40
Hub Hub is offline
Junior Member
Join Date: Dec 2005
Location: Ipswich UK
Age: 57
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Please, help us to test new CSS Editor

Quote:
Originally Posted by benbramz
is this an actual question...if so ill split the post for you n send it to css...
Yes
Reply With Quote
  #4 (permalink)  
Old Dec 12th, 2005, 11:44
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Positioning with css

done
Reply With Quote
  #5 (permalink)  
Old Dec 12th, 2005, 15:06
Hub Hub is offline
Junior Member
Join Date: Dec 2005
Location: Ipswich UK
Age: 57
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

So all I need now is an answer!
Reply With Quote
  #6 (permalink)  
Old Dec 12th, 2005, 21:28
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

Okay for the menu/body its
HTML: Select all
 <div style="float: left; width: 200px;">
 Link<br />
 Link<br />
 Link<br />
 Link<br />
</div>
<div style="float: left; width: 550px;">
<p>This is my wonderful content, its very contentish.</p>
</div>
<br style="clear: left;" />
As for the Images with the text in the middle, I'm not realy sure what you mean...
Reply With Quote
  #7 (permalink)  
Old Dec 13th, 2005, 15:16
Hub Hub is offline
Junior Member
Join Date: Dec 2005
Location: Ipswich UK
Age: 57
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

Quote:
Originally Posted by Pheonix
As for the Images with the text in the middle, I'm not really sure what you mean...
I have an image in the top left (actually split into three at the moment), an image in the top right of the screen (again split into three at the moment) and then a bar that runs right across the screen but expands or contracts according to screen size.

Above the bar in the centre at the top is a strapline which is text (for search engines to pick up).

In case you did not see it this is the draft page:

http://www.hub-uk.com/hub2/
Reply With Quote
  #8 (permalink)  
Old Dec 13th, 2005, 18:19
Hub Hub is offline
Junior Member
Join Date: Dec 2005
Location: Ipswich UK
Age: 57
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

Quote:
Originally Posted by Pheonix
Okay for the menu/body its
HTML: Select all
 <div style="float: left; width: 200px;">
 Link<br />
 Link<br />
 Link<br />
 Link<br />
</div>
<div style="float: left; width: 550px;">
<p>This is my wonderful content, its very contentish.</p>
</div>
<br style="clear: left;" />
I tried this code out. I want my main body of text to be able to flow right across the page to the right of the screen. If I change the width to 98% or 800px or more I have a problem - the main body of text appears below the menu.
Reply With Quote
  #9 (permalink)  
Old Dec 13th, 2005, 19:15
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

Remove the width then ;-) lol
Reply With Quote
  #10 (permalink)  
Old Dec 13th, 2005, 19:20
Hub Hub is offline
Junior Member
Join Date: Dec 2005
Location: Ipswich UK
Age: 57
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

Quote:
Originally Posted by Pheonix
Remove the width then ;-) lol

It was that simple!
Reply With Quote
  #11 (permalink)  
Old Dec 13th, 2005, 19:20
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

For your images, postion one at left 0px, top 0px. The other at right 0px, top 0px.
Then for your text use postion left 0px +width of left picture (so if your image had a width of 100px your text would be postion left 100px), top 0px then set the right margin to the width of the picture on the right.

There are lots of ways you could do it.
Reply With Quote
  #12 (permalink)  
Old Dec 13th, 2005, 19:31
Hub Hub is offline
Junior Member
Join Date: Dec 2005
Location: Ipswich UK
Age: 57
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

Quote:
For your images, position one at left 0px, top 0px. The other at right 0px, top 0px.
Then for your text use position left 0px +width of left picture (so if your image had a width of 100px your text would be position left 100px), top 0px
I have actually split the images into three sections. Presumably I would just position them with the top position for the second image being the same as the height of the first image. Then I would position the text with the top measurement being how far down amongst the images I want it to come.

How do I cope with the bar that goes across the page. In tables I have just used a small section of it and given it a measurement of 100%. If I was to give an images such a measurement in CSS wouldn’t it just throw the images to the right of the screen out of position?

Quote:
then set the right margin to the width of the picture on the right.
I am not quite sure what you are saying here. If the pages is to expand from 800 x 600 screens to the bigger screens I don’t actually know where the right margin will be or am I on the wrong tack?
Reply With Quote
  #13 (permalink)  
Old Dec 13th, 2005, 19:45
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning with css

HTML: Select all
<div style="width: 100px; height: 100px; position: absolute; top: 0px; left: 0px;">This is your left images</div>
<div style="height: 100px; position: absolute; top: 0px; left: 100px; right: 100px;">This is your header.</div>
<div style="width: 100px; height: 100px; position: absolute; top: 0px; right: 0px;">This is your right images</div>
There...
However the problem with this one is that when you make the screen narrow, the right images will float over/under the header, you could tweek this effect by useing z-index. Or by useing min-width which I don't think works in IE which sucks
Reply With Quote
Reply

Tags
positioning, css

Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Positioning between <h3> konnor5092 Web Page Design 3 Sep 11th, 2007 22:37
CSS and positioning djme Web Page Design 6 Feb 3rd, 2006 13:27
Positioning with CSS Tino Web Page Design 8 Jan 21st, 2006 15:45
css positioning ivyholly Web Page Design 14 Dec 20th, 2005 18:43
div positioning benbacardi Web Page Design 10 May 24th, 2004 12:25


All times are GMT. The time now is 16:04.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43