CSS Layout issues.
I've just started working with CSS and thus i'm running into a few problems. The linked image shows the layout that i'm trying to create using 's and css. It's basically a content box which is centered but it has two horizontal rules on both sides that expand out when the browser window is expanded. I was having a little trouble accomplishing this and was wondering what is the easiest and most compatible way do to this. thanks for your help in advance.
Dragon of Ice posted this at 00:07 — 8th March 2005.
He has: 578 posts
Joined: Jun 2004
How I would go about it is making a background image and then centering it.
background: url('path here') top center;
Renegade posted this at 02:57 — 8th March 2005.
He has: 3,022 posts
Joined: Oct 2002
Do you have a live link to your problem?
RenardMF posted this at 03:21 — 8th March 2005.
They have: 13 posts
Joined: Mar 2005
Ya i've tryed a few things to get it to work like floating and setting percentages. I got the one on the left to work before but mostly have trouble with the one on the right. Maximize the window to somewhat get what im trying to accomplish.
Live Layout
I managed to have some success before using tables to accomplish this. Of course it worked with the center content was in table fashion and not div as it is now. The only problem i see is that the background images of the surrounding td's are not showing up.
Table attempt
Dragon of Ice posted this at 01:02 — 9th March 2005.
He has: 578 posts
Joined: Jun 2004
Was my solution crazy or something? I'm not demanding you use it or anything, but I'd just like to know if I was way off target.
RenardMF posted this at 01:25 — 9th March 2005.
They have: 13 posts
Joined: Mar 2005
Well it's not just a simple div i'm trying to do this its a div with enclosed content (i.e. a bunch of div's with absolute positioning as well as some php includes) and then I want those lines on the sides of it to expand when the window does. I might be going at this wrong though since opera doesnt like my layout too much so any suggestions how to make it more compatible would be good. I have updated the css recently opting for auto margin on the main container.
I mean you could be right. I am new to this...
[update]
OK well i kinda got it working now:
Working?
I think there is still a little problems with other browsers, IE6 and Firefox seem to work fine after I hid some stuff from IE.
RenardMF posted this at 01:04 — 19th March 2005.
They have: 13 posts
Joined: Mar 2005
Well Dragon of Ice I took your advice and rewrote the site much like in the style of your orange drop one But I am having some trouble placing the actual content: here Part of my problems involve the various php includes i have that output tabular data and such so it kinda makes it hard for me to get it just right.
With the desired result to be something like this.
Any further advice would be much appreciated.
Dragon of Ice posted this at 16:29 — 19th March 2005.
He has: 578 posts
Joined: Jun 2004
It seems to me that the only problem are the login links. I don't have time to look at the code right now, but try adjusting the width so the content box fits in, or try some relative positioning or margins.
P.S.
I'm in firefox
dk01 posted this at 16:56 — 19th March 2005.
He has: 516 posts
Joined: Mar 2002
Looks like you are getting a hold of things. In Firefox the links above the login and password are not sized correctly. You also have 90 html errors here:
http://validator.w3.org/check?verbose=1&uri=http%3A//www.brushfireproductions.com/index.php
My #1 piece of advice is to constantly validate. It will catch 95% of coding mistakes which cause problems when the page is displayed.
Once you have done that you should validate your css here:
http://jigsaw.w3.org/css-validator/
Doing this will keep your page working and save you tons of time sorting through sloppy code.
-dk
RenardMF posted this at 14:04 — 25th March 2005.
They have: 13 posts
Joined: Mar 2005
Ya I really got it working good right now I figured out the positioning issues but I still have a slight problem and it's with firefox. It has to do with the border I put around the content box, in IE it covers and expands with the entire box but in firefox the border doesn't carry. How do I correct this problem?
pmj7 posted this at 21:49 — 28th March 2005.
He has: 234 posts
Joined: Nov 2002
IE and Firefox work differently when it comes to widths and borders. One adds the width of the borders to your defined width, the other assumes that it's a combined total. Workarounds: box-hack model, and nested divs/spans.
Peter
Touchup image processing applet
Pixel Development Web Design, Photography
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.