Unregistered Avatar

Reply

[css] 2 Column Layout


 
LinkBack Thread Tools Display Modes

  #1 (permalink)  

Old 03-14-2005, 03:14 PM

[css] 2 Column Layout

dicuss the two column layout tutorial found here:

Two Column CSS Layout Tutorial
missionsix

missionsix is offline http://patandrew.com/

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,922

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #2 (permalink)  

Old 10-03-2006, 03:28 PM

Re: [css] 2 Column Layout

Hi I have tried implemnting this into my website but it doesn't work. Is it because I have an image of 5px by 5px but I am however making the background repeat it's self.
Whosblazin

Whosblazin is offline registered.

Join Date: Oct 2006

Posts: 1

  #3 (permalink)  

Old 10-03-2006, 06:05 PM

Re: [css] 2 Column Layout

look at the final page and just change the widths / background images and you should get the results you want. if that doesnt work, since your probably changing widths and what not. Head on over to www.alistapart.com and search for faux columns article.
missionsix

missionsix is offline http://patandrew.com/

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,922

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #4 (permalink)  

Old 05-27-2007, 09:59 PM

Re: [css] 2 Column Layout

OK I copied your code, and created the two files, index.html & twocol.css -- which I linked correctly. I see two issues; (1) the left column does not come out right color-wise. (2) I notice you want to use 2.gif as a background-image. Your css code causes a generic 2.gif file to appear in the bottom two divs. (3) The background-color "transparent" does not seem to function properly. (This is the first time I have tried using THAT color, lol.)

I want to make designs which are cross-browser compatible, allowing ONLY tiny misalignment issues the common man's eye won't detect. Any other positional or style issues I find, I beat my head on the desk (figuratively) until I find the tweak that makes it so.

I will continue to tweak on your ideas, because I am replacing a frameset website with top/left/main areas due to other FireFox-don't-get-it issues.

Note: I find that css codes I learn at W3Schools work flawlessly in Internet Explorer, and that Mozilla FireFox has a tendency to misinterpret these codes, causing unsightly problems many times. Meanwhile, my Norwegian pal Erik makes designs that look great in FireFox but that IE sometimes garbles. I am seeking the Holy Grail, the KeyCode, the Magic Wand of webdesign, that makes cross-browser issues predictable and therefore invisible (after I wave the Wand, that is). I have yet to learn what the prefixes are for "IE Only" or "Mozilla Only" for example, which allows two similar property/value settings to reside in the same selector.

Last edited by JIM_ELL; 05-27-2007 at 10:06 PM.
JIM_ELL

JIM_ELL is offline noobie webdesigner

JIM_ELL's Avatar

Join Date: May 2007

Location: AR, USA

Posts: 21

Send a message via MSN to JIM_ELL

  #5 (permalink)  

Old 05-27-2007, 10:17 PM

Re: [css] 2 Column Layout

IE's box model is a little fudged when using floats.


My new approach is to use a wrapper div, set it at position:relative; then position other sections of the site accordingly. I could do a small writeup if you like. We could use the newer content.


In the mean time...

HTML Code:
<style type="text/css">
body {
    text-align:center;
}
#wrap {
    width:960px;
    margin:5px auto; /* the auto makes it center itself */
    text-align:left; /* align the text left */
}
#header {
    height:150px;
    margin:0px; 
    padding:0px;
}

#content {
    padding-left:250px;
    position:relative; /* makes absolute positioned child elements relative to this. */
    background:transparent url(/img/body_bg.gif) repeat-y top left;
}
#side {
    width:240px;
    position:absolute;
    top:10px;
    left:0px;
}

</style> <div id="wrap"> <div id="header"> <h1>Title of the page</h1> </div> <div id="content"> <p>Your content section</p> <div id="side">
                sidebar
        </div> </div> <div id="footer">
       copyright and footer links
    </div> </div>
missionsix

missionsix is offline http://patandrew.com/

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,922

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #6 (permalink)  

Old 05-28-2007, 11:30 PM

Re: [css] 2 Column Layout

Pat,
Thanks for your interest, but sorry to point out your code does not pass the test.
Looks ok in FireFox but awful in Internet Explorer: (attachments below)
NOTE I add this code to view divs...
Code:
<!-- TEMP CODE -- DELETE THIS STUFF BEFORE PUBLISHING FINAL PAGE -->
<style>
div {border: 1px dotted #FF0000; }
p {border: 1px dotted #FF0000; }
</style>
<!-- END OF TEMP CODE -- DELETE NOTHING BELOW THIS LINE -->
Do you know where the Holy Grail / Key Code / Magic Wand I sopke of previously --^ can be found?
Attached Images
File Type: gif article-code-FF.gif (30.7 KB, 9 views)
File Type: gif article-code-IE.gif (38.4 KB, 10 views)
JIM_ELL

JIM_ELL is offline noobie webdesigner

JIM_ELL's Avatar

Join Date: May 2007

Location: AR, USA

Posts: 21

Send a message via MSN to JIM_ELL

  #7 (permalink)  

Old 06-16-2007, 10:02 AM

Re: [css] 2 Column Layout

Alright, I had this SAME problem with a layout that I'd been creating. It shows up perfectly in IE, but in Firefox it doesn't change anything, it doesn't expand at all to match the other side. Any ideas?
sryinex

sryinex is offline registered.

Join Date: Jun 2007

Posts: 4

  #8 (permalink)  

Old 06-16-2007, 02:02 PM

Re: [css] 2 Column Layout

Well, it would help if you linked us to your project for examination.
We do not know what your layout looks like from your description,
nor can we view your coding to assist you.
JIM_ELL

JIM_ELL is offline noobie webdesigner

JIM_ELL's Avatar

Join Date: May 2007

Location: AR, USA

Posts: 21

Send a message via MSN to JIM_ELL

  #9 (permalink)  

Old 06-16-2007, 03:27 PM

Re: [css] 2 Column Layout

Well it was worth a shot, but


Sryinex.com - Who?


I haven't even gotten to the footer yet.
sryinex

sryinex is offline registered.

Join Date: Jun 2007

Posts: 4

  #10 (permalink)  

Old 06-18-2007, 06:16 PM

Re: [css] 2 Column Layout

Well, it looks to me like you've smacked it into shape!

The only comment worthy of note is that Mozilla's Firefox doesn't show
the grey background-color of the [sublinks] section.

I like IE7. IE7 behaves. IE7 understands what the W3Schools teach.
JIM_ELL

JIM_ELL is offline noobie webdesigner

JIM_ELL's Avatar

Join Date: May 2007

Location: AR, USA

Posts: 21

Send a message via MSN to JIM_ELL

  #11 (permalink)  

Old 06-18-2007, 06:33 PM

Re: [css] 2 Column Layout

Well see that's the issue, I need it to show correctly in Firefox and it won't. Could you please direct me on how to make it compliant?
sryinex

sryinex is offline registered.

Join Date: Jun 2007

Posts: 4

  #12 (permalink)  

Old 06-18-2007, 06:47 PM

Re: [css] 2 Column Layout

Safari and Firefox show it fine here.
__________________
AtomicHype

AtomicHype is offline Ping Island

AtomicHype's Avatar

Join Date: Apr 2005

Posts: 2,546

Send a message via AIM to AtomicHype

  #13 (permalink)  

Old 06-18-2007, 07:22 PM

Re: [css] 2 Column Layout

Nevermind, I fixed it.

Seems as if my footer code was causing it not to work, adding a clear: left; to footer css code made it all work dandy.

Thanks :0


EDIT: Well that was one problem fixed, now it expands correctly in IE and in Firefox if the left content area is expanded, but if the right column is longer than the left, the left won't expand to fit the right...interesting.

EDIT2: Fixed...lol.... changed clear:left to clear: both;

Sorry I'm a bit new to CSS.

Last edited by sryinex; 06-18-2007 at 07:32 PM.
sryinex

sryinex is offline registered.

Join Date: Jun 2007

Posts: 4

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Layout in progress Midnight_Wolf Digital Art Showcase 3 05-28-2007 11:48 PM
Second layout. NiN Digital Art Showcase 3 02-25-2005 09:13 PM
New Layout Beer Slut Website Design 4 05-20-2004 08:37 PM


All times are GMT -7. The time now is 10:51 AM.