This is a discussion on "Moving from Tables" within the Web Page Design section. This forum, and the thread "Moving from Tables are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Moving from Tables
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Moving from Tables
OK i'm a table junkie as every time i try CSS the different browsers cause me so much pain i always go back to tables.
But i'm not going to this time, i'm going to get my head around CSS. But i have a problem This is the new CSS page: http://dev.hobbit-hosting.com what i need is to get the bottom of the div to align with the context div. the page should look like http://dev.c4media.co.uk when i finish the other bits (this one has a table type template with a bit CSS.) Any tips on getting this to work? |
|
#2
|
||||
|
||||
|
Re: Moving from Tables
Here's some tips for writing cross browser code:-
Reset all elements margins, paddings and text-size's in your css - this is because different browsers use different defaults - be sure to add the following code to the beginning of your css file.
My last tip is to never design for internet explorer. Design for firefox, and then fix the bugs in IE.... never the other way round - most people who have massive cross browser headaches dont do this. The above will make your life twenty times easier.
__________________
Rob - Webforumz Founder I am currently NOT available for SEO consultancy work My Sites: Student Midwife Forum
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#3
|
|||
|
|||
|
Re: Moving from Tables
Thanks for the Firefox tip. I tend to use Dreamweaver to do the sites and find what i see there is what firefox will look like.
I do tend to put the margin and padding at the begining, but i tend to put it in the body, should i move it to *? |
|
#4
|
||||
|
||||
|
Re: Moving from Tables
definitly use *.... this will apply to ALL elements and basically reset their defaults. You then need to set these up where needed because nothing will have padding or margin anymore by default.
Doing it this way, and explicitily defining them tends to remove a lot of issues spacing, positioning and text sizing issues across browsers.
__________________
Rob - Webforumz Founder I am currently NOT available for SEO consultancy work My Sites: Student Midwife Forum
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#5
|
|||
|
|||
|
Re: Moving from Tables
Right i've been having a play and there's a few things i just can't get working.
http://dev.hobbit-hosting.com 1) The Menu on the left. The white border should go around the whole button but for some reason the green background pops out on the left a bit. 2) The left Div (menu div) the bottom doesn't match up with the context. Here is the code. CSS
|
|
#6
|
|||
|
|||
|
Re: Moving from Tables
If you haven't already, i'd recommend installing firebug (firefox extension) and then using that to debug your css - makes life tons easier.
|
|
#7
|
|||
|
|||
|
Re: Moving from Tables
I've downloaded that but can't see why the div is not working correctly
|
|
#8
|
|||
|
|||
|
Re: Moving from Tables
In firebug, I was able to fix the white border not going around the left side nav items by editing #navlist li a - removing width: 100% - I think that that was pushing the width of the A items such that with the padding they were larger than the containing LI element....
You can fix the gap beneath the nav items by adding url(images/css/background-03.gif) to the div#wrapper and setting it to top left, repeat-y so it tiles down the left side and shows beneath all the other elements. Hope that helps! |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Moving Nav bar | acrikey | Web Page Design | 5 | Sep 26th, 2007 14:37 |
| Moving | Ryan Fait | Webforumz Cafe | 36 | Jun 12th, 2007 23:55 |
| Images moving | notagz1 | Web Page Design | 5 | May 22nd, 2007 04:04 |