/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Firefox CSS Width Issue

I’m diving head first into CSS-driven thinking and trying to get out of my beloved table heavy designs.

First order of business is setting up my online portfolio. Here’s the site: [URL=”http://www.elevan.net”]www.elevan.net[/URL].

As you can see (in Firefox), the middle section is not expanding to its set width and also not displaying it’s x-repeated background image, but in IE, it’s a different story, once I set the vertical-align property to get it to behave, it works fine.

I’m displaying the three divs inline.

CSS below:

html, body, p, table, tr, td, div, span
{
margin: 0px;
padding: 0px;
font-family: Verdana;
font-size: 10pt;
color: #333;
}

body { background-color: #000; }
img { vertical-align: bottom; }
a img { border: 0; }

#container
{
padding-top: 30px;
width: 100%;
height: 100%;
}

#contentbody
{
width: 788px;
}

#header
{
width: 788px;
height: 58px;
}

#logo
{
display: inline;
width: 230px;
height: 58px;
}

#bg
{
display: inline;
width: 200px;
height: 58px;
background-image: url(top_bg.gif);
background-repeat: repeat-x;
vertical-align: bottom;
}

#phrase
{
display: inline;
width: 358px;
height: 58px;
}

Thanks for any help!

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@FangJul 16.2008 — Show a complete document.
Copy linkTweet thisAlerts:
@mathursrishtiJul 16.2008 — I saved the page locally and did not find "top_bg.gif" among the files saved.
Copy linkTweet thisAlerts:
@mathursrishtiJul 16.2008 — Also, the html is not well formatted
Copy linkTweet thisAlerts:
@CentauriJul 16.2008 — You cannot set widths and heights to inline elements. There is a lot of excess here - the #contentbody div is not needed at all, as the width can be set on #container and centred using auto side margins. The top_bg.gif file can be a background to the #header div, the logo link does not need a div around it, and the #phrase div would be better as a heading text, with the image as a background via the css :[CODE]<div id="container">
<div id="header">
<a href="index.php" title="Home" id="logo"><img src="template/signature.gif" alt="Eric LeVan"></a>
<h1>Eric LeVan Web Development &amp; Design"></h1>
</div>
... rest of site ...

</div>[/CODE]

[CODE]#container {
padding-top: 30px;
width: 788px;
margin: 0 auto;
}

#header {
background: url(top_bg.gif) repeat-x;
height: 58px;
}

#logo {
float: left;
width: 230px;
height: 58px;
}

#header h1 {
float: right;
width: 358px;
height: 58px;
font-size: 1px;
background: url(top_right.gif);
margin: 0;
}[/CODE]
Copy linkTweet thisAlerts:
@FearedAtheistauthorJul 16.2008 — Thanks Centauri!
×

Success!

Help @FearedAtheist spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...