Jump to content

css parse error


jackblasto

Recommended Posts

Can anyone please tell me what syntax problems are with this css code? Thanks for any help.

 

1 * Parse Error *html .block_left{ background-image:url(images/nav_block.gif); background-repeat:no-repeat; float:left; width:227px; height:191px; margin-left:10px; }

79 * Parse Error *html .block_right{ background-image:url(images/side_banner_bg.jpg); background-repeat:no-repeat; float:right; width:437px; height:86px; margin-right:10px; font-size: 36px; padding-left: 10px; padding-top: 105px; color: #FFFFFF; }

120 * Parse Error *html .left_content{ float:left; width:227px; margin-left:10px; margin-top:10px; }

138 * Parse Error *html .right_content{ margin-top:10px; float:right; width:437px; margin-right:10px; padding-left: 10px; border-left: solid 1px #F2F2F2; }

 

Here is the whole css page if that helps diagnose it.

style.css

Link to comment
Share on other sites

Thanks a bunch. That cleared up the css parse errors. Unfortunately it didn't help my layout problem which I hoped it would. I have the original html and css up here http://sandrablack.com/silverglow/index.html and even it doesn't display properly on mozilla firefox or safari. Any ideas on what is causing that upper left image to not show up in the upper left on these browsers? Thanks again.

layout messed up in mozilla and firefox

Link to comment
Share on other sites

A couple things that will help fix Firefox display issues

 

-- add "overflow:hidden" to .header

-- set a width on the floated left div within .header (200px worked for me, but you'll need to tweak it as necessary)

 

At least on my version of Firefox (3.5 Mac) everything else seemed fine. You'll need to check other browsers for inconsistencies as well.

Link to comment
Share on other sites

The overflow:hidden works great for getting it in the right spot but what syntax would I use to set the floated left div? Thanks again for the help.

 

This is what I did but I know I have the syntax wrong for setting the second thing you instructed me to do:

 

.header{

height:36px;

padding:5px;

padding-left:22px;

overflow:hidden;

block_left:227; <--! my guess but pretty sure it does nothing and the column is clipped-->

 

}

Link to comment
Share on other sites

Sorry, should have explained this better. Here's your header code:

 

<div class="header">
 <div style="float: left;"><img height="36" width="37" align="left" alt="logo" src="images/logo.gif"> 
   <h1 style="padding-top: 5px;">YourNameHere.com</h1></div>

 <div class="navigation"><a class="nav" href="/index.html">home</a> | <a class="nav" href="/index.html">about</a> | <a class="nav" href="/index.html">services</a> |<a class="nav" href="/index.html"> contact </a></div>
</div>

 

Ideally, you remove the 'style="float: left;"', replace it with a class like so:

 

<div class="logo">

 

and then style it in your CSS file:

 

.logo { float:left; width:227px; }

 

You'll need to remove "block_left:227; " from your CSS -- block_left isn't a valid CSS attribute.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...