473,396 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Positioning with stylesheets...

I am trying to do away with tables, and am trying to learn how to position
things with CSS just how I want them to look. The problem I've run into is
that one design in particular seems imposible to do unless I absolutely
position everything and that is less than optimal because you can't center
everything that way, it has to be anchored to the left side.

The layout I'm trying to do is here:

http://www.dvigroup.net/album/beta/

I have it working with absolute positioning, but I've had to decide on a set
width of 1024px and base everything on that. I don't like having to do
that.

What would be PERFECT is if I could set the center image however I wanted
(probably based on the center,middle of a TD unless there is a better way to
find that position with CSS) and then place everything else based on that
center piece's position.

Thanks!

-----------------
Shawn Wilson
Aug 24 '05 #1
1 1427
Shawn Wilson wrote:
I am trying to do away with tables, and am trying to learn how to position
things with CSS just how I want them to look. The problem I've run into
is that one design in particular seems imposible to do unless I absolutely
position everything and that is less than optimal because you can't center
everything that way, it has to be anchored to the left side.

The layout I'm trying to do is here:

http://www.dvigroup.net/album/beta/

I have it working with absolute positioning, but I've had to decide on a
set
width of 1024px and base everything on that. I don't like having to do
that.

What would be PERFECT is if I could set the center image however I wanted
(probably based on the center,middle of a TD unless there is a better way
to find that position with CSS) and then place everything else based on
that center piece's position.

Thanks!

-----------------
Shawn Wilson


Usually absolute positioning is not a good idea. Better would be to use
floats. You could try a five column layout each with an id, say #col1,
#col2, etc with rules

#col1 {float:left;}, #col2 {float:left}, etc.

Place the images in each column, then adjust the positions of individual
images using margins. The whole lot enclosed by a wrapper div with rule

#wrapper {margin:0 auto;}

which should centre it.
You will need to work out column widths carefully to contain within the
overall width of 1024.
Incidentally this width is going to cause many visitors to have to
horizontal scroll, most common screen resolution is probably still 800 x
600.

I don't have time to work out a suitable layout but some links to floats
which may help are :

http://www.communitymx.com/abstract.cfm?cid=AC008 -
Good overview of how floats work.
http://css.maxdesign.com.au/floatutorial -
Good overview of float theory, plus a number of float exercises to follow
along with.
http://www.complexspiral.com/publica...aining-floats/ -
An explanation of why floats are removed from the flow, and how you can
contain them.
http://www.positioniseverything.net/easyclearing.html -
How to contain floats without adding extra markup.
http://css-discuss.incutio.com/?page=FloatLayouts -
A variety of float topics from the css-discuss wiki.

Regards,
Mike Davies
--
Mike Davies
Integra Web Design
Aug 25 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Tom Szabo | last post by:
Hi, Just wondering if there are any disadvantage in absolute positioning controls on a page? In example instead of putting the text fields into a table to align properly, one would absolute...
7
by: Ken | last post by:
Does any one know how I can position the output at certain point? Such as If I want to print "hello" starting at position 50 from the left in the file. Ken
2
by: Susan Addams | last post by:
I'm slogging thru chapter 9 in O'Reilly's "Cascading Style Sheets: The Definitive Guide". It's a bugger to understand some of the terms he's throwing about with regard to css positioning. I was...
2
by: Christoffer Berg | last post by:
Hi I'm having some trouble positioning blocks inside other blocks. The way I understand it "position: absolute;" means that the position is relative to the parent's upper left corner. This...
7
by: delerious | last post by:
I just found a bug that's related to positioning in IE 5.5 (could someone please tell me if this bug exists in IE 6, and if so, if my solution works in that browser?). I don't know if this bug has...
14
by: Michael Satterwhite | last post by:
On my page, I'm positioning text on top of a graphic. I'm using the following code on my page: <img src="images/plainTop.gif" border="0" alt="" /> <div style="position: absolute; top:98px;...
17
by: George Hester | last post by:
http://tinyurl.com/5uj6w The lower middle icon the "block" should not drop down when the mouse is over it. How can I stop that? Also the navigation divs both top and bottom should follow the...
1
by: Charles Harrison Caudill | last post by:
with tables there is a clean and algorithmic way to organize things, but with css which is, once you get it working, much cleaner, I have to tweak and patch and hope and pray and curse before...
12
by: Jens | last post by:
Hi everyone, I'm trying to build a simple dropdown menu for a website and i need to need a way to retrieve the top and left style attributes of an object. However it seems style attributes like...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.