homepage Welcome to WebmasterWorld Guest from 54.166.39.179
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
full browser width outside wrapper
roclimb

5+ Year Member



 
Msg#: 4076759 posted 4:15 am on Feb 9, 2010 (gmt 0)

Hi,

I have a 100 pixel wide wrapper/container with a 3 column layout in it. I want to place a long div with auto margins that takes up the entire browser width for a header. I want this outside of the wrapper and on top of the page. For some reason when I make a div there it wont let me add a color and styles. Any suggestions?
Thanks

 

glimbeek



 
Msg#: 4076759 posted 3:27 pm on Feb 10, 2010 (gmt 0)

Can you give us your code?

This should work:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin: 0px;
}
#header {
background-color: #FF0;
width: 100%;
}
#wrapper {
width: 100px;
}
#col1 {
width: 20px;
background-color:#3F3
}
#col2 {
width: 40px;
background-color:#CCC
}
#col3{
width: 40px;
background-color:#F0F;
}
-->
</style>
</head>

<body>
<div id="header">Header text</div>
<div id="wrapper">
<div id="col1">Col1</div>
<div id="col2">Col3</div>
<div id="col3">Col3</div>
</div>
</body>
</html>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved