![]() |
|
||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||
|
|
#1 |
|
WLC Lover
Join Date: Nov 2009
Posts: 68
|
Hi guys,
Constructive feedback greatly appreciated on this rough layout. Go easy! I'm learning!! My reasoning for doing what I have done. I wanted a fixed width 960 wide website. I found out that to have the grey column go all the way down I had to do a faux mod. Have I done it correctly? I have 5 sections with the icons. I did these as classes and then padded the text itself rather than the id so it wouldn't push all the othe other divs out/ recalculate sizes etc etc. Is this shortcut acceptable and correct? The footer text needs to be vert centred and as css can't do this simply what is the best and simplest way to get this to happen? I have read that its good practice to have the *reset margins which I have added for *body. Is this correct? Any general advice please... The site... http://fornofood.com.au/testsite/ |
|
|
|
|
|
#2 |
|
WLC Super Mod
Join Date: Feb 2008
Location: Texas
Posts: 1,330
|
Hi dj,
Let me take a look at it and I'll post back.
__________________
Ray H. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. |
|
|
|
|
|
#3 |
|
WLC Lover
Join Date: Nov 2009
Posts: 68
|
Thank you Rayzur.
You'de probably given up on me. I've been doing my head in reading all this CSS :-) |
|
|
|
|
|
#4 | ||||
|
WLC Super Mod
Join Date: Feb 2008
Location: Texas
Posts: 1,330
|
Quote:
Code:
background: url(images/greybg.gif) repeat-y right; Quote:
Quote:
Most all of my demos are set up like that and you can see how it works by viewing the page source here. http://www.css-lab.com/demos/2col/2col-fixed-soc.html Quote:
Code:
*body {
margin: 0px;
padding: 0px;
}
Code:
*{margin: 0;padding: 0;}
If you look at the css from that link I gave above you will see my "Typography" styles at the bottom. Then on the body element at the very top I set the margins and padding there as I choose.
__________________
Ray H. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. |
||||
|
|
|
|
|
#5 |
|
WLC Lover
Join Date: Nov 2009
Posts: 68
|
Fantastic thanks Rayzur.
I had been using the line height tip re vert centering but thought it was not the right way. It seemed to work fine. And I will try the UL suggestion and see how I go. One more... The note I put... re padding text instead of the id. Is that the done thing? Seems so much easier than padding an ID and then having to adjust everything else because of the blowout. ? |
|
|
|
|
|
#6 | |||
|
WLC Super Mod
Join Date: Feb 2008
Location: Texas
Posts: 1,330
|
Quote:
Quote:
Quote:
__________________
Ray H. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. |
|||
|
|
|
|
|
#7 | |
|
WLC Lover
Join Date: Nov 2009
Posts: 68
|
Quote:
I'm having a play now with the UL option so will compare when I see yours. Thanks again. At last some of this is making a little sense for me. |
|
|
|
|
|
|
#8 |
|
WLC Lover
Join Date: Nov 2009
Posts: 68
|
Rayzur,
The images in each of those divs will be different and there will be extra ones also in there. Would I still use the unordered list method? Thanks Last edited by djpete; 3rd February 10 at 01:56 AM. |
|
|
|
|
|
#9 | |
|
WLC Super Mod
Join Date: Feb 2008
Location: Texas
Posts: 1,330
|
Quote:
If you are going have additional images in there along with separate BG images it could go either way. You can use divs, though I would go ahead and set up an ID to go along with each of those servicesbox classes. That will allow you to use individual BG images via the css and then you can set the other images in the html. I got the code going in that direction for you and set up some "p" and "h'' styles also. You will see where I set up ID's for the service BG images, just change them accordingly. I have them all set with that same image now. Hope that helps HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Test Page</title> <style type="text/css"> * {margin:0;padding:0;} body { margin:0; padding:0; background:#AAA; font:100% Arial, Helvetica, sans-serif; } #container { width:960px; margin:20px auto; overflow:hidden;/*contain inner floats*/ background:#FFF url(images/greybg.gif) repeat-y right; } #header { height:150px; text-align:center; background:#8ECDFA; } #nav { height:40px; line-height:40px; background:#000; color:#FFF; } .service { float:left; width:154px; text-align:center; padding-top:70px; /*BG image height*/ } #a {background:#CDF url(images/hosting.jpg) no-repeat 50% 10px;} #b {background:#BBF url(images/hosting.jpg) no-repeat 50% 10px;} #c {background:#CDF url(images/hosting.jpg) no-repeat 50% 10px;} #d {background:#BBF url(images/hosting.jpg) no-repeat 50% 10px;} #e {background:#CDF url(images/hosting.jpg) no-repeat 50% 10px;} .service p{color:red;} #rcol { float:right; width:180px; padding-top:.5em; } #content { float:left; width:780px; padding-top:.5em; text-align:justify; } #footer { clear:both; height:50px; line-height:50px; background:#333; text-align:center; font-weight:bold; color:#FFF; } /*=== Demo Typography ===*/ h1,h2,h3,p{margin:0 .5em .5em; font-size:1.5em;} h1{padding-top:.3em; margin-bottom:.15em} h2{font-size:1.2em;} h3{font-size:1.1em;} p{font-size:1em;} #nav p, #footer p{ margin:0; font-weight:bold; text-align:center; } </style> </head> <body> <div id="container"> <div id="header"> <h1>Webpage Title Here</h1> </div> <div id="nav"> <p>Nav Links Here</p> </div> <div class="service" id="a"> <p>Service div id=a</p> <p>Service div id=a</p> <p>Service div id=a</p> </div> <div class="service" id="b"> <p>Service div id=b</p> <p>Service div id=b</p> <p>Service div id=b</p> </div> <div class="service" id="c"> <p>Service div id=c</p> <p>Service div id=c</p> <p>Service div id=c</p> </div> <div class="service" id="d"> <p>Service div id=d</p> <p>Service div id=d</p> <p>Service div id=d</p> </div> <div class="service" id="e"> <p>Service div id=e</p> <p>Service div id=e</p> <p>Service div id=e</p> </div> <div id="rcol"> <p class="textpadding">Lorem ipsum dolor sit amet consectetuer nisl vitae porttitor id ut. Habitasse In aliquam magna consectetuer Quisque lorem Nam et sapien et. Ut vitae ac venenatis malesuada id ipsum nibh mattis Vestibulum orci.</p> </div> <div id="content"> <p>Lorem ipsum dolor sit amet consectetuer sit metus orci ultrices elit. Dictum pretium pretium Nulla parturient lacinia Duis augue pede nec id. Dui wisi nulla tellus et sem Vestibulum convallis et Phasellus cursus. Lorem semper at at senectus Fusce elit vitae mattis nibh tincidunt. Lacinia leo dolor Integer pretium et sit mauris tincidunt Donec pellentesque.</p> <p>Id Vestibulum pellentesque sem aliquet lorem Fusce velit Vestibulum Morbi leo. Pretium mauris tincidunt cursus ac montes id convallis quis tristique ac. Et mauris porta gravida interdum pretium eu Phasellus ridiculus semper sem. Vitae ante nascetur ipsum et justo amet malesuada hac malesuada lacus.</p> <p>Main content here</p> <p>Main content here</p> <p>Main content here</p> </div> <div id="footer"> <p>Footer Stuff Goes Here</p> </div> </div><!--end container--> </body> </html>
__________________
Ray H. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts. |
|
|
|
|
|
|
#10 |
|
WLC Lover
Join Date: Nov 2009
Posts: 68
|
Thanks Rayzur.
Have to study what you have done there. Very tidy and short! |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
Linear Mode |
|
|