473,748 Members | 6,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2522
gr*********@gma il.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*********@gma il.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 "bottomcont ent" 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"
"bottomcont ent" should be to the left of "bottomimag e"

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*********@gma il.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
3752
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 their dtor is called immediately and not at the end of the function. to be able to use return objects (to avoid copying) i often assign them to a const reference. now, casting a const return object from a function to a non-const reference to this...
3
12260
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 nonblocking mode in c++? I did something ugly like --- c/c++ mixture --- mkfifo( "testpipe", 777);
25
7638
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
32
4524
by: Adrian Herscu | last post by:
Hi all, In which circumstances it is appropriate to declare methods as non-virtual? Thanx, Adrian.
8
3510
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 cannot load/unload/reload extensions into my large and slow-to-load application during development without restarting the process then the disadvantages may outweigh the advantages. I've got a mixed-mode program in which I create a new AppDomain...
14
8461
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
3444
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 vtable pointer is made use of.. eg. class one {
2
6114
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 pointers, but I'm not sure. Please help. The code: void equate(matrix *A, matrix *B) { int i, j; assert(A.row_dim == B.col_dim && A.col_dim == B.col_dim); for(i=0; i < A.row_dim; i++) for(j=0; j < A.col_dim; j++)
0
2345
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 jobs. When a non-secure page references a secure page with relative URL, the web server generates error until absolute URL with https prefix is used. On the other hand when a secure page references a non-secure page, the non-secure page will be...
399
12887
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 to python-3000@python.org In summary, this PEP proposes to allow non-ASCII letters as identifiers in Python. If the PEP is accepted, the following identifiers would also become valid as class, function, or variable names: Löffelstiel,...
0
9541
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.