Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > 2 Columns... 1 Problem

Reply
Thread Tools

2 Columns... 1 Problem

 
 
1995 Cobra
Guest
Posts: n/a
 
      01-31-2007
Greetings all, still fairly new to CSS and all the great layout issues
that come with different browsers. Quick question. I have a
"container" <div> that is 980px wide. Inside it are 2 other <div>. One
is 660px wide and the other is 300px. They are floated left and right
respectively. Logically this should leave 20px between them. They have
no borders, padding, or margins. Problem is, in IE the one floated
right is on the right side, but doesn't begin until after the one on
the left... almost like it had {cleared} it. I am not using any clears
however. I have several other <div> and <span> inside these two
columns, again none of which use {clear} and none whos properties
exceed the column width. Any ideas? Site can be viewed here: http://
www.healthcarenewsnetwork.tv

Thank you

 
Reply With Quote
 
 
 
 
Peter Smit
Guest
Posts: n/a
 
      01-31-2007
1995 Cobra wrote:
> Greetings all, still fairly new to CSS and all the great layout issues
> that come with different browsers. Quick question. I have a
> "container" <div> that is 980px wide. Inside it are 2 other <div>. One
> is 660px wide and the other is 300px. They are floated left and right
> respectively. Logically this should leave 20px between them. They have
> no borders, padding, or margins. Problem is, in IE the one floated
> right is on the right side, but doesn't begin until after the one on
> the left... almost like it had {cleared} it. I am not using any clears
> however. I have several other <div> and <span> inside these two
> columns, again none of which use {clear} and none whos properties
> exceed the column width. Any ideas? Site can be viewed here: http://
> www.healthcarenewsnetwork.tv
>
> Thank you
>

the div slot1 is 660px but is positioned with 135px left.
Peter
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      01-31-2007
Scripsit 1995 Cobra:

> Greetings all, still fairly new to CSS


We can see that from the following:

> I have a "container" <div> that is 980px wide.


> Any ideas?


Learn CSS from some good textbook or tutorial. Hint: Material that teaches
you to use px for anything but directly image-related issues isn't good.

You'll just get farther in a wrong direction if you proceed now. Return to
the starting point and get a fresh start.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      01-31-2007
On 31 Jan, 17:17, "Jukka K. Korpela" <(E-Mail Removed)> wrote:

> Learn CSS from some good textbook or tutorial.


Do you have recommendations?
Plenty of bad ones out there, good ones are worth knowing about.

 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      01-31-2007
Andy Dingley wrote:
> On 31 Jan, 17:17, "Jukka K. Korpela" <(E-Mail Removed)> wrote:
>
>> Learn CSS from some good textbook or tutorial.

>
> Do you have recommendations?
> Plenty of bad ones out there, good ones are worth knowing about.
>

So far the ones at www.htmldog.com are the best I've seen

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      01-31-2007
In article
<(E-Mail Removed) .com>,
"Andy Dingley" <(E-Mail Removed)> wrote:

> On 31 Jan, 17:17, "Jukka K. Korpela" <(E-Mail Removed)> wrote:
>
> > Learn CSS from some good textbook or tutorial.

>
> Do you have recommendations?
> Plenty of bad ones out there, good ones are worth knowing about.


I have!

Read "Head First HTML & CSS" (readable tutorial, encourages the
right mindset, not a good reference)

Read Lie & Bos (readable, accurate, good reference afterwards)

Read <brainjar.com> (best and most readable text I know of on
CSS positioning and especially float)

Code valid HTML. Getting CSS to work is hard enough with valid
code, trying to do it without is crazy.

Validate your HTML, so that it actually _is_ valid

Write well-structured HTML. Less is more. A minimal HTML page is
usually better than one with excess taggage all over the place.

Write detailed HTML. HTML should be minimalised as much as
possible, but no further! If you _need_ that extra <div> or
<br>, then use it. Don't play gymnastics with CSS selectors when
a slight addition to the HTML gives a simpler solution overall.

Don't pander to browser errors. If you can't fix it neatly in 5
minutes, either don't use that feature or just let the IE users
suffer until they learn bettter. _Don't_ write crap code just
because it works in this Tuesday's IE patch. You have to live
with this stuff long-term afterwards.

--
dorayme
 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM



Advertisments