NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Web Design Discussion
Reload this Page Problem with firefox display - div width

Web Design Discussion Discussion of web design techniques, advice, browser issues, software, design firms.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-01-2005, 11:19 AM THREAD STARTER               #1 (permalink)
New Member
 
volos's Avatar
Join Date: Feb 2005
Posts: 4
volos is an unknown quantity at this point
 



Problem with firefox display - div width


Hi folks, I'm new here and yes, you guessed it, I have a small problem.
For my website layout I will use a simple design - one div for the header and one for the content.
Now the site is displayed correctly in Opera and IE but Firefox displays the content div a few pixels wider, which really makes it look horrible.
I specified them to the same width.
Oh, here's the address: http://freeweb.siol.net/miranlpv/test
Thanks in advance for your help!

Oh by the way, does anyone know how to position a piece of text in a div to the bottom of the div? vertical-align for the text didn't work so I had to move it by using position:relative. I know, a crude solution but it did the trick.
????: NamePros.com http://www.namepros.com/web-design-discussion/67840-problem-with-firefox-display-div-width.html

By the way, here's how it looked to me with firefox http://freeweb.siol.net/miranlpv/screen.gif
volos is offline  
Old 02-01-2005, 11:38 AM   #2 (permalink)
NamePros Regular
 
EricH's Avatar
Join Date: Dec 2004
Posts: 253
EricH is on a distinguished road
 



Well, you could put them both in a DIV tag which is centered and using a width of 468. Then give your div tags a 100% width (which would be 100% of 468). The only other reason I say you may want to try this is that supposedly the <center> tag will become obsolete in the future... supposedly.

Nevermind, something in your coding is messed up. I don't have time to find it right now, but doing it the way I suggested should have given two 100% block and it didn't (in FireFox)... http://www.w3bids.com/test.html
EricH is offline  
Old 02-01-2005, 01:58 PM   #3 (permalink)
New Member
Join Date: Jan 2005
Posts: 6
Dwaggy is an unknown quantity at this point
 



its the padding you have in your div.content.

add the padding to your h1 and p elements instead.

????: NamePros.com http://www.namepros.com/showthread.php?t=67840
protip : Your markup contains useless stuff really, you could get the page to look exactly the same with the following markup :

<h1>Name of page</h1>
<ul>
<li><a href="#">Menu item 1</a></li>
<li><a href="#">Menu item 2</a></li>
<li><a href="#">Menu item 3</a></li>
<li><a href="#">Menu item 4</a></li>
</ul>
<h2>Newspost header</h2>
<p>Lorem ipsum dolor sit amet</p>
<p>ipsum sit amet dolor lorem</p>

Last edited by Dwaggy; 02-01-2005 at 02:02 PM.
Dwaggy is offline  
Old 02-03-2005, 10:10 AM THREAD STARTER               #4 (permalink)
New Member
 
volos's Avatar
Join Date: Feb 2005
Posts: 4
volos is an unknown quantity at this point
 



Thanks for the replies guys!
Anyway, it looks like I still haven't solved the problem.
Removing the padding inside the div.content makes the width correct for all browsers but it shifts the div.content a few pixels downwards. I think it shouldn't do that, really. Cause when you think about it, padding should influence how much child elements are seperated from the parent element and not expand the parent element. So is that a display bug in firefox? Or a 'feature'?
????: NamePros.com http://www.namepros.com/showthread.php?t=67840
Inserting the padding inside the h1 and p sections does indeed make the width like it should, but I don't like the idea of having to add padding inside almost every element inside the div. And the vertical offset still remains (just remove the padding from the div and you'll see).
I have no idea why firefox does that with the padding and why the whole thing moves downward if the padding is removed.
volos is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:37 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger