iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-2005, 04:28 PM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default css issues (help)

I am trying to build a compliant site. It is very simple in design and small but when I view it in firefox I am getting a seperation between my logo and the rest of the site.

www.mauihawaiiluau.com

/*this is the style sheet*/
body {
background-color: #666666;
color: #666666;
font-family:Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 12pt;
margin: 0;
}
h1 {
font-size: 24pt;
color: #0000ff;
text-align: right;
letter-spacing: 2px;
font-family: Impact, Tahoma, Arial, Helvetica, sans-serif;
text-decoration:underline;
}
h2 {
text-align:center;
font-size: 24pt;
color: #0000FF;
text-decoration:underline;
}
h3 {
text-align:center;
font-size: 12pt;
font-family: Tahoma, Arial, Helvetica, sans-serif;
}
h4 {
text-align:center;
font-size: 7pt;
}
h5 {
text-align:center;
font-size: 24pt;
color:#FF0000;
font-family:Arial, Helvetica, sans-serif;
}
h6 {
text-align:center;
font-size: 14pt;
color:#FF0000;
font-family:Arial, Helvetica, sans-serif;
}
p {
font-size: 11pt;
font-weight: 500;
font-family:Tahoma, Verdana, Arial, Helvetica, sans-serif;
text-align:justify;
line-height: 1.3em;
}
a:link {
}
a:visited {
}
a:hover {
color:#0000FF;
}
#mauivacationpage {
margin-left: auto;
margin-right: auto;
}
#mauihawaiiluaulogo {
margin: 0;
padding: 0;
background-image: url(images/mauiluaulogo2.jpg);
border: 0px;
height: 200px;
width: 800px;
}
#content {
margin: 0;
padding: 0;
position:relative;
border: 0px;
top: 0px;
width: 800px;
height: 100%;
}
#main-text {
color:#000000;
background-color:#cccc66;
margin-left: 150px;
padding-right: 10px;
padding-left: 10px;
top: 0px;
width: 630px;
font-family:Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 16pt;
}
#main-text a:link, #main-text a:visited, #main text a:hover {
text-align:center;
}
#navbar {
position:absolute;
text-align:center;
background-color: #999999;
top: 0px;
left: 0px;
width: 150px;
}
#navbar ul li {
list-style-type: none;
margin: 0;
padding: 0;
}
#navbar ul {
margin: 0;
padding: 0;
}
#navbar ul li a:link, #navbar ul li a:visited {
display: block;
text-decoration: none;
background-color: #999933;
font-weight:bold;
color: #333333;
border-bottom: solid #000000 1px;
padding-top: 3px;
padding-bottom: 3px;
}
#navbar ul li a:hover {
background-color: #666600;
}
#main-text h2 a:link, #main-text h2 a:visited {
color:#cccc66;
text-decoration:underline;
}

thanks in advance
Reply With Quote
  #2 (permalink)  
Old 12-29-2005, 05:48 PM
WebProWorld Veteran
 
Join Date: Apr 2005
Location: Winter Park, FL
Posts: 616
KeithO RepRank 0
Default

try dropping the
Code:
</img>
thats not valid and might be causing your problem.
Reply With Quote
  #3 (permalink)  
Old 12-29-2005, 05:52 PM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default valid?

Quote:
Originally Posted by KeithO
try dropping the
Code:
</img>
thats not valid and might be causing your problem.
You know I had never closed an img tag but when I used the w3c validator for xhtml it told me they had to be closed so I tried it and it no longer returned an error.
Reply With Quote
  #4 (permalink)  
Old 12-29-2005, 05:58 PM
WebProWorld Veteran
 
Join Date: Apr 2005
Location: Winter Park, FL
Posts: 616
KeithO RepRank 0
Default

do it like this
Code:
[img]blah.jpg[/img]
Reply With Quote
  #5 (permalink)  
Old 12-29-2005, 06:06 PM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default thanks

thanks for the heads up ... unfortunately doesn't fix problem
Reply With Quote
  #6 (permalink)  
Old 12-30-2005, 03:31 AM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 0
Default

First of all, your left side menu is messed in IE.

Try this in your CSS to fix it:

img {
border: none;
}

As far as your issue with the header goes, change a few things around and it should work:

#mauivacationpage {
margin-left: auto;
margin-right: auto;
position: relative; /* This will position all sub elements in relative terms to this div. It comes in handy later. */
width: 800px;
}
#content {
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
margin-top: 200px;

padding: 0;
border: 0px;
width: 800px;
}
The margin-top will position the content div 200 pixels from the top of the page in both browsers.

Next property:
#mauihawaiiluaulogo {
position: absolute; /* because this div is a child of the #mauivacationpage div, the positioning will be defined based on the coordinates of it vs. the body coordinates */
top: 0;
left: 0;

margin: 0;
padding: 0;
background-image: url(images/mauiluaulogo2.jpg);
border: 0px;
height: 200px;
width: 800px;
overflow: hidden; /* Not necessary, but somtimes it helps. It never hurts to be a little paranoid. */
}

Note: you can put your logo div after your content div if you like. It won't make a difference since it's absolutely positioned. I tend to do this with my absolutely positioned elements when possible so that I know they're not part of the normal flow of the document.

Try that and let me know. Just make a backup copy first in case you get lost or something gets messed up.
Reply With Quote
  #7 (permalink)  
Old 12-30-2005, 03:43 AM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default thank you adam

That makes a lot of sense, I hadn't thought of forcing things up there by specifying a distance ... duh, sometimes you think too much about a problem and miss the obvious

as far as the border around the weather ... I messed that up right before I left work ... I was using border="0" in my html but wanted it to be compliant

I tried
img [src|="wunderground"] {
border: 0;
}
I think that was it, the problem is that I want the pics at the bottom of the page to have borders but not the weather link

thank you again, I was going nuts ... new to css and compliant design and thought this small project was a good place to start

btw I added the overflow hidden already but no luck
Reply With Quote
  #8 (permalink)  
Old 12-30-2005, 08:32 PM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default still no luck with fix

I tried Adam's fixes with no luck.

Still can't figure this one out.

The site displays fine on IE but on firefox, it gets a space between the logo and the body, has anyone run into this before?
Reply With Quote
  #9 (permalink)  
Old 12-31-2005, 01:04 PM
MarcieZoob's Avatar
WebProWorld Veteran
 
Join Date: Jul 2004
Location: Michigan, USA
Posts: 931
MarcieZoob RepRank 2
Default DIV tag

Remove the style="float:left" from the tag below and the space in Firefox s/b fixed.

[img]/images/fireknife23.jpg[/img]
__________________
Marcie Wolf
AlphaGeek Web Design | MarcieWolf.com
Reply With Quote
  #10 (permalink)  
Old 12-31-2005, 03:43 PM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default Thank You

Thanks Marci,

That does get rid of the space, but unfortunately it doesn't allow the text to wrap and puts the image in the middle

Probably a good place to start though
Reply With Quote
  #11 (permalink)  
Old 01-02-2006, 08:57 PM
MuNKyonline's Avatar
WebProWorld Veteran
 
Join Date: Jun 2004
Location: Suffolk, England
Posts: 777
MuNKyonline RepRank 2
Default

Add align="right" or align="left" in the img tag and that should allow the text to wrap.

HTH
Reply With Quote
  #12 (permalink)  
Old 01-03-2006, 02:38 PM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default Thanks again

Hey Munky,
Thanks for your tip, but if you use <align> then the page is not w3c valid.

I know there is a way around this, but I haven't had time to figure it out.
Reply With Quote
  #13 (permalink)  
Old 01-03-2006, 03:06 PM
MrLeN's Avatar
WebProWorld Veteran
 
Join Date: Jul 2003
Location: Melbourne, Australia
Posts: 381
MrLeN RepRank 0
Default

This will fix your problem mate:

h1 {
margin-top: 0px;
}

MrLeN
Reply With Quote
  #14 (permalink)  
Old 01-03-2006, 04:49 PM
WebProWorld Pro
 
Join Date: Nov 2005
Location: hawaii
Posts: 126
frogmanandy RepRank 0
Default That's the stuff

Let's hear it for the Aussies!

Thank you so much I was tearing my hair out .. lol

Knew it would be something simple
Reply With Quote
  #15 (permalink)  
Old 01-03-2006, 04:59 PM
MrLeN's Avatar
WebProWorld Veteran
 
Join Date: Jul 2003
Location: Melbourne, Australia
Posts: 381
MrLeN RepRank 0
Default

No worries mate :)

MrLeN
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:49 PM.



Search Engine Optimization by vBSEO 3.3.0