This is a discussion on "Help with a layout issue" within the Web Page Design section. This forum, and the thread "Help with a layout issue are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Help with a layout issue
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Help with a layout issue
I'm trying to stop making sites with tables and i'm making the change to CSS. I'm finding it difficult to get the layout how i'd like it, and it's really pushing me back to tables.
Here's the problem. I've designed a site that uses a sort of 'Two Row' layout. The top 'row' is a background image, where i'll be placing my navigation and such. The bottom 'row' is just a a regular background, possibly just one colour, I haven't decided exactly what it's going to be. The problem i'm facing is that, i've defined the top background by putting it in body { margin: 0; padding: 0; text-align: center; background: url("topbg.jpg") repeat-x top; } and now I can't seem to work out how I could get this bottom background to not go over the top background. If you didn't understand that, It's hard to explain |
|
|
|
|||
|
Re: Help with a layout issue
Quote:
www.gizcore.com Notice that he also has the top background defined in the body. |
|
|||
|
Re: Help with a layout issue
.body usually holds the page background.
To get a two row design like you are suggesting you would want a header div and a content div. (name them anything you want) html [code]<div id="header">All your header content here incuding your background and navigation</div> <div id="content">All your lower content falls in this area</div>[code] css would look like this;
|
|
|||
|
Re: Help with a layout issue
that's how I would do it too! do it with 2 div layers, each with a different background.
You can also give the whole body the background for the second div, and then define a background for the first one. The second div would have background:transparent; (the body background would then "shine through") |
|
|||
|
Re: Help with a layout issue
Quote:
I was going to do it like that, but the problem is, it doesn't fill the screen like i'd like it to. When it's defined with 'body' it looks like this: http://img403.imageshack.us/img403/3420/help2cs1.jpg When it's defined using the header class, it looks like this: http://img115.imageshack.us/img115/1237/help3se5.jpg As you can see, there's that ugly white border that I don't want. Any ideas? Thanks again. Last edited by Kirryn; Jun 17th, 2007 at 15:56. |
|
|||
|
Re: Help with a layout issue
Resolved! Yay!
I do feel like a real idiot now, though, it was so simple... body { margin: 0; padding: 0; text-align: center; background: #1F1F1F url(topbg.jpg) repeat-x top;} I didn't realise I could use an image aswell as a colour. Well, time to move on to content. Thanks again to all those who helped. |
|
|||
|
Re: Help with a layout issue
LOL! Good for you! The best lessons are the hard ones! Way to go!
|
|
||||
|
Re: Help with a layout issue
Should be
background: #1F1F1F url(topbg.jpg) left top repeat-x;} BTW. =)
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
||||
|
Re: Help with a layout issue
^ actually no ... it's
Efficient CSS with shorthand properties |
![]() |
| Tags |
| css, help, layout, problem |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Major layout issue | thewebkid | Web Page Design | 23 | Dec 22nd, 2007 03:31 |
| CSS Layout issue between IE and Firefox | macu | Web Page Design | 2 | Aug 22nd, 2007 13:14 |
| Question about layout/IE7 issue | bluetech | Web Page Design | 3 | Jul 3rd, 2007 15:37 |
| menu / layout positioning issue in IE | Pixelate | Web Page Design | 2 | May 9th, 2006 13:15 |
| Homepage layout issue | webwiz2000 | Web Page Design | 2 | Feb 28th, 2006 17:49 |