473,387 Members | 1,535 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,387 software developers and data experts.

New to non-table layout trying CSS div layout with difficulties.

Hi folks,

I've been using CSS for style for several years now, but I've never
attempted a layout using CSS. (I'd like to move away from tables)

I'm working on a page here:
http://www.eurekacamp.ca/demo/contact.php
using the stylesheet here:
http://www.eurekacamp.ca/demo/Eureka.css

To describe it as a table. I'm hoping to have a large cell with the
text for a section contained in it. and then a smaller cell with an
image. My problem is I simply can't get the DIV tags to align side by
side. The second div keeps showing up below where the first one
finishes.
I have seen something like this work here on css-discuss:
http://css-discuss.incutio.com/?page=TwoColumnFloat

I don't understand why their example works and my attempt does not.

I appreciate any assistance (and pointers) the community can provide.

Thanks
Greg.

Mar 17 '06 #1
4 2506
gr*********@gmail.com wrote:

To describe it as a table. I'm hoping to have a large cell with the
text for a section contained in it. and then a smaller cell with an
image. My problem is I simply can't get the DIV tags to align side by
side. The second div keeps showing up below where the first one
finishes.

What two divs are you talking about?
(<div>s are elements, not tags.)

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 17 '06 #2
On 16 Mar 2006 21:34:07 -0800, gr*********@gmail.com wrote:
Hi folks,

I've been using CSS for style for several years now, but I've never
attempted a layout using CSS. (I'd like to move away from tables)

I'm working on a page here:
http://www.eurekacamp.ca/demo/contact.php
using the stylesheet here:
http://www.eurekacamp.ca/demo/Eureka.css

To describe it as a table. I'm hoping to have a large cell with the
text for a section contained in it. and then a smaller cell with an
image. My problem is I simply can't get the DIV tags to align side by
side. The second div keeps showing up below where the first one
finishes.
I have seen something like this work here on css-discuss:
http://css-discuss.incutio.com/?page=TwoColumnFloat

I don't understand why their example works and my attempt does not.

I appreciate any assistance (and pointers) the community can provide.

Thanks
Greg.


1. (Comment) The sample you provided is nowhere near non-table layout.
2. (Answer) Your #topcontent and #bottomcontent has 60% width each, how do
you expect them to fit side by side in 800px table cell, which is 100% in
your case, where you may have to need 120%?

--
o'tom po'tom
Mar 18 '06 #3
OK, good clarification on "element" versus "tag" thank you.

Yes, I was hoping for a hybrid approach until I wean myself off of
tables.

As I am used to tables, if I have rows. (my page has a table with rows)
in a given row I have 100% to work with, so my "topcontent" has 60% and
my "bottomcontent" has 60% because they are in seperate rows. I'm
working under the understanding that these Divs will live within the
table rows because that is where they have been placed (they are
contained) and that within that row, CSS can be used to layout the
elements in that row.

Does that make sense? I'm well aware of how poorly this page is
working, what I'm asking is why the Div elements won't co-exist side by
side (at the same location vertically on the page) when I'm specifying
widths for the elements that are less than 100% So
"topcontent" should be to the left of "topimage"
"bottomcontent" should be to the left of "bottomimage"

Sounds to me like I should just use tables.
Unless this is really straight forward?

Greg.
Nije Nego wrote:
On 16 Mar 2006 21:34:07 -0800, gr*********@gmail.com wrote:
Hi folks,

I've been using CSS for style for several years now, but I've never
attempted a layout using CSS. (I'd like to move away from tables)

I'm working on a page here:
http://www.eurekacamp.ca/demo/contact.php
using the stylesheet here:
http://www.eurekacamp.ca/demo/Eureka.css

To describe it as a table. I'm hoping to have a large cell with the
text for a section contained in it. and then a smaller cell with an
image. My problem is I simply can't get the DIV tags to align side by
side. The second div keeps showing up below where the first one
finishes.
I have seen something like this work here on css-discuss:
http://css-discuss.incutio.com/?page=TwoColumnFloat

I don't understand why their example works and my attempt does not.

I appreciate any assistance (and pointers) the community can provide.

Thanks
Greg.


1. (Comment) The sample you provided is nowhere near non-table layout.
2. (Answer) Your #topcontent and #bottomcontent has 60% width each, how do
you expect them to fit side by side in 800px table cell, which is 100% in
your case, where you may have to need 120%?

--
o'tom po'tom


Mar 19 '06 #4
I've started my compromise. I've retreated back to tables, but have
used an absolutely positioned graphic (tree on the right side of the
page).

http://www.eurekacamp.ca/demo/contact.php

I liked the effect so much I decided to try it on the left with a div
that holds images (each image 200px wide, the div 200px wide, so they
stack vertically.) I had planned top pop this on the left of the page
and then use the table to bump the text to the right so it didn't
collide. However, I'm seeing the images from the div TWICE. once
they appear as if the stylsheet didn't exist and the second time they
seem to be positioned correctly. These are foreground images. The
stylesheet can be seen here: http://www.eurekacamp.ca/demo/Eureka.css

Thanks for your assistance, sorry for the novice questions, but my css
positioning skill is quite low.

Greg.

Mar 19 '06 #5

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

Similar topics

5
by: klaus triendl | last post by:
hi, recently i discovered a memory leak in our code; after some investigation i could reduce it to the following problem: return objects of functions are handled as temporary objects, hence...
3
by: Mario | last post by:
Hello, I couldn't find a solution to the following problem (tried google and dejanews), maybe I'm using the wrong keywords? Is there a way to open a file (a linux fifo pipe actually) in...
25
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
32
by: Adrian Herscu | last post by:
Hi all, In which circumstances it is appropriate to declare methods as non-virtual? Thanx, Adrian.
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
14
by: Patrick Kowalzick | last post by:
Dear all, I have an existing piece of code with a struct with some PODs. struct A { int x; int y; };
11
by: ypjofficial | last post by:
Hello All, So far I have been reading that in case of a polymorphic class ( having at least one virtual function in it), the virtual function call get resolved at run time and during that the...
2
by: Ian825 | last post by:
I need help writing a function for a program that is based upon the various operations of a matrix and I keep getting a "non-aggregate type" error. My guess is that I need to dereference my...
0
by: amitvps | last post by:
Secure Socket Layer is very important and useful for any web application but it brings some problems too with itself. Handling navigation between secure and non-secure pages is one of the cumbersome...
399
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.