PDA

View Full Version : Another new website


brbsta
02-01-2009, 11:11 PM
Finally made my website after a few years with a coming soon page. Not totally done yet but wanted to upload so i could start my search opt. Link is http://uticalawn.com/Index.php. Any comments would be great. And after reading many comments on here I'll will say that I know the site wont totally validate because I am using php.

JDUtah
02-02-2009, 04:19 AM
Nice pic on the first page... but when you can, take it again right after you trimmed/edged that lawn.

brbsta
02-02-2009, 10:05 AM
Yea, I know problem was there's a foot of snow on the ground right now and that's the only picture I could find, had a computer crash a while ago and lost everything. This spring I have to get out and take picts and update site quite a bit.

Kiril
02-03-2009, 10:27 AM
And after reading many comments on here I'll will say that I know the site wont totally validate because I am using php.

PHP is a server side language, it still outputs HTML code therefore the final source should be validated.

That being said, you only have 7 errors on your homepage using a strict DTD .... :clapping: These can be easily fixed.

brbsta
02-03-2009, 10:40 AM
The error I am getting is cause I am not declaring a Doc type in the content pages. I am in the main index, but not home.php, about and so on. If I declare it in the includes it fixes those errors, but give me like 3 different ones for declaring them twice. I don't know whats worse.

Kiril
02-03-2009, 10:57 AM
The error I am getting is cause I am not declaring a Doc type in the content pages. I am in the main index, but not home.php, about and so on. If I declare it in the includes it fixes those errors, but give me like 3 different ones for declaring them twice. I don't know whats worse.

Is this home brewed php or are you using a CMS?

brbsta
02-03-2009, 01:37 PM
Its all my own coding. I can fix a few of the errors, but then I'm getting errors in view in different browsers. Having a real problem getting the who site centered in IE and FF. Im using a div which seems to take care of IE, but css is not working in IE what so ever. So I am having to use just a align tag to do it, just never ending.

Kiril
02-03-2009, 01:59 PM
Post the PHP code you are having problems with and I'll take a look.

Also, not following you on the "who site"

brbsta
02-03-2009, 02:04 PM
I ment to say whole site. Well the CSS I'm using to center the main table is

#center {
display:block;
margin:0 auto;
}

Then my code is:
<div id="center">
<table border="0" cellpadding="0" cellspacing="0" class="center" align="center">

I know that is crazy redundant and I hate it. But the problem is I cannot get the site centered without all that I have tried everything. Any ideas on CSS to work in both IE and FF.

Kiril
02-03-2009, 02:21 PM
I ment to say whole site. Well the CSS I'm using to center the main table is

#center {
display:block;
margin:0 auto;
}

Then my code is:
<div id="center">
<table border="0" cellpadding="0" cellspacing="0" class="center" align="center">

I know that is crazy redundant and I hate it. But the problem is I cannot get the site centered without all that I have tried everything. Any ideas on CSS to work in both IE and FF.

Your CSS is not valid code. I suggest you read up on the margin property. Also keep in mind, if the parser encounters an error when reading CSS, the rest of the file gets discarded. Furthermore, your CSS positioning is now worthless because of your hardcoded markup. Remove the positioning attributes in the HTML, fix the CSS and remove the block property.

Word of advice .. use something like a "center" class to do generic centering, use specific classes or ids for containers.

When designing CSS positioned sites (or any CSS) .... the validator is your best friend.

brbsta
02-03-2009, 02:31 PM
Yea, that is my last attempt at it. I did use a container also:

div.container {width:98%; margin:1%;}
table#main {text-align:center; margin-left:auto; margin-right:auto; width:100px;}
tr,td {text-align:left;}

But I may had had the html code messed up which may had screwed with it. Guess I'll try it again and keep a eye on my html.

Kiril
02-03-2009, 02:36 PM
Yea, that is my last attempt at it. I did use a container also:

div.container {width:98%; margin:1%;}
table#main {text-align:center; margin-left:auto; margin-right:auto; width:100px;}
tr,td {text-align:left;}

But I may had had the html code messed up which may had screwed with it. Guess I'll try it again and keep a eye on my html.

Use the validator dude. Fix the HTML errors and the CSS so both validate with no errors or warnings ... especially given you are using a strict DTD.

Once you are sure the code is valid ... then you can address the positioning problems.

....... and get rid of ALL hardcoded formatting in your HTML. That more likely than not is the reason why you are having problems.

JDUtah
02-03-2009, 02:39 PM
I will admit I haven't done a CSS layout yet but my next site will be for sure.

Would this be an easy way to center the main div?

<span style="text-align:center;">
<div class="maindiv">
Your stuff here
</div>
</span>

Just thinking ahead.

Or I just found this... (the above doesn't seem to work in IE)
http://www.thesitewizard.com/css/center-div-block.shtml

Kiril
02-03-2009, 02:46 PM
I will admit I haven't done a CSS layout yet but my next site will be for sure.

Would this be an easy way to center the main div?

<span style="text-align:center;">
<div class="maindiv">
Your stuff here
</div>
</span>

Just thinking ahead.

Or I just found this... (the above doesn't seem to work in IE)
http://www.thesitewizard.com/css/center-div-block.shtml

NO!

That is invalid HTML. You can't wrap a block level element with an inline element.

<div class="main"> content </div>

.main { margin: 0 auto 0 auto; }

or this should work as well

body { margin: 0 auto 0 auto; }

body div.main { margin: 0 auto 0 auto; }

JDUtah
02-03-2009, 02:55 PM
NO!

That is invalid HTML. You can't wrap a block level element with an inline element.

<div class="main"> content </div>

.main { margin: 0 auto 0 auto; }

or this should work as well

body { margin: 0 auto 0 auto; }

body div.main { margin: 0 auto 0 auto; }

Ahhh duh, good point. Thanks Kiril!

I thought a CSS layout would be dreadful, but it is starting to look easier than tables. :weightlifter:

Kiril
02-03-2009, 03:05 PM
I thought a CSS layout would be dreadful, but it is starting to look easier than tables. :weightlifter:

IMHO tables are only good for one thing .... displaying tabular data.

All CSS layouts will give you the most flexibility, however when you get into multi-column layouts, the CSS becomes VERY tricky to keep compatible across all major browsers and at least the last 2-3 major versions of those browsers.

You think CSS layouts are tricky .... try building a CSS table that is compatible in all major browsers for the last 2-3 major versions. :laugh:

jblawns123
02-03-2009, 05:32 PM
Ummm.... the layout is exactly like my site, Did my site inspire you?

brbsta
02-03-2009, 09:29 PM
jb- Honestly no, basically ever site I do looks basically the same since my php template is made for it. Although I did get the service area on bottom from you. Turned out to work out good. Already number 1 or 2 on Google for all the cities with lawn care/maintenance. You should look at the Google map i created for service area its pretty cool.

Kiril-Got it all validate and all css actually works out on both IE and FF. Only thing that it a little bit off is that on FF the Link bar table height ends up being like 5px bigger then it should be adding a second bar under it. Thanks for the help.

Kiril
02-03-2009, 09:38 PM
Kiril-Got it all validate and all css actually works out on both IE and FF. Only thing that it a little bit off is that on FF the Link bar table height ends up being like 5px bigger then it should be adding a second bar under it. Thanks for the help.

OK, now get rid of the table, no need for it.

brbsta
02-03-2009, 09:42 PM
So with the roll overs how do i do it without a table. My layout right now is basically still all tables using class= to apply css.

brbsta
02-03-2009, 11:06 PM
So with the roll overs how do i do it without a table. My layout right now is basically still all tables using class= to apply css.

Wow, why didn't I do that 5 years ago. SO much easier. Still have to figure out how to use float and such to get server columns and rows lined up but awesome.

Kiril
02-03-2009, 11:27 PM
Wow, why didn't I do that 5 years ago. SO much easier. Still have to figure out how to use float and such to get server columns and rows lined up but awesome.

I'm still seeing tables. Stay away from floats if at all possible. Also I am not seeing what you are talking about ... the columns. Looks like one column to me.

Also, you need to take a hard look at that form .... lots off unnecessary code.

brbsta
02-03-2009, 11:35 PM
The bottom service area part. The table looks like the linked image with cells next to one another and on top of one another.http://uticalawn.com/images/table.jpg

Kiril
02-03-2009, 11:39 PM
That can be easily done without floats .... hint .... be CSS creative with your pictures

Another hint ... you don't need 4 blocks to do this, 1 or 2 will suffice.

Kiril
02-03-2009, 11:49 PM
Another hint ... you don't need 4 blocks to do this, 1 or 2 will suffice.

jblawns123
02-04-2009, 09:41 AM
jb- Honestly no, basically ever site I do looks basically the same since my php template is made for it. Although I did get the service area on bottom from you.

Hey no problem.... I browse sites for ideas too, just looked very similar, even the logo has some of the same elements. Any other things I can help you with feel free to ask. Nice site BTW

tatmkr
02-12-2009, 10:05 AM
- Come on now, it's been 11 days since you asked for advice and you haven't found a few words to tell people who you are. Add something to that page.
- Was going to mention the duplicate pics, but you already know the pictures need work
- 20% off the first month sounds pretty weak, try to give them a $30 gift card to somewhere