| | |
Layout Problems
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Solved Threads: 0
Hi I'm trying to make a portfolio website and I'm having some issues with the layout. What I'm having trouble with is using divs and having background colors extend the edges of the browser. I'm having a hard time explaining what I mean so here is an image of what I want it to look like: http://www.domusludorum.com/seth/sethport.jpg.
You can see that the background extends left and right to the edges for each section, and the content is centered. When I use divs, no matter what I do there is a margin. Any ideas on how I can achieve what I want?
You can see that the background extends left and right to the edges for each section, and the content is centered. When I use divs, no matter what I do there is a margin. Any ideas on how I can achieve what I want?
•
•
Join Date: Jan 2008
Posts: 97
Reputation:
Solved Threads: 6
That looks like a template you got off the web. I guess it's not really my place to say, but shouldn't a web developer develop his own website?
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Solved Threads: 0
I appreciate your comments, however, I made this layout myself in Illustrator. I used a screenshot of Safari to make it clear how I intend it to look. Also, Design by Two is my wife and I.
So this web developer is developing his own website.
Does anyone have any more constructive ideas?
So this web developer is developing his own website.

Does anyone have any more constructive ideas?
Last edited by sethbaur; Feb 25th, 2008 at 12:19 am.
can you post code of that page. (along with css)
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Indian Developer
http://falaque.wordpress.com/
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Solved Threads: 0
I'm sorry, I'm probably not describing my situation very well. The image is just a mock-up created in Adobe Illustrator. My problem is coding it. For example, in the image the header background extends to the edges to of the browser window with no margin. However, when I try to code this there is always a margin around the black part.
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Solved Threads: 0
I am making some progress. Here's a screenshot of what I currently have: http://www.domusludorum.com/seth/picture3.png
The margin issue is fixed however there is unnecessary horizontal scrolling. I'm not sure why it's doing this?
Here's the css:
And also the HTML in question:
The margin issue is fixed however there is unnecessary horizontal scrolling. I'm not sure why it's doing this?
Here's the css:
HTML and CSS Syntax (Toggle Plain Text)
body { margin:0px; } div.header { padding-left:120px; background-color:#000; padding-top:5px; padding-bottom:5px; width:100%; height:110px; }
And also the HTML in question:
HTML and CSS Syntax (Toggle Plain Text)
<body> <div class="header"><h1>Seth P. Baur</h1></div> </body>
Use CSS:
Should get rid of borders on the page itself..
CSS Syntax (Toggle Plain Text)
body, html { margin:0; padding:0; }
Plato forgot the nullahedron..
try:
CSS Syntax (Toggle Plain Text)
body { margin:0; padding:0; } div.header { background-color:#000; height:110px; } h1 { margin-top:5px; margin-left:120px; margin-bottom:5px; }
Last edited by MattEvans; Feb 25th, 2008 at 11:59 am.
Plato forgot the nullahedron..
Hm.. try setting the 5px top and bottom margins on the h1 to 0, and adding a padding top/ padding bottom of 5px to the div. ( same as you had before; but without setting the width of the div, or a large inner left padding on the div )
Last edited by MattEvans; Feb 25th, 2008 at 12:09 pm.
Plato forgot the nullahedron..
![]() |
Similar Threads
- Layout manager problems (Java)
- Gridbag Layout Probelm [Code Included] (Java)
- GridBag layout problems. (Java)
- DreamweaverMX 2004 Pro- Plague of Layout Problems (Site Layout and Usability)
- Layout in CSS (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: image positioning using css
- Next Thread: Client added messages
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






