CSS layout question - height of outer DIV
Hopefully this is a quick one - In the past I've used CSS for the main layout of a page, but still used tables within a DIV. But I'm trying to be good and used DIVs there too.
Anyway - I have a basic example here:
http://www.learners-guide.co.uk/lessons/cockpit-drill/layout.php
With the row in the main content split into two columns, using:
#outerWrapper #contentWrapper #content #row_one {
width:580px;
border:2px solid #333;
background-color:#99FF99;
padding:10px;
#outerWrapper #contentWrapper #content #row_one #row_one_left {
width: 288px;
height:auto;
padding:0px;
float:left;
margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
#outerWrapper #contentWrapper #content #row_one #row_one_right {
width: 288px;
height:auto;
padding:0px;
float:right;
margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
The problem is that the #row_one_left and #row_one_right colums spill out of the containing #row_one DIV.
How would I make the containing DIV expand to contain the columns? I can do it by specifying a height of the #row_one DIV, but assume this is bad form, and would produce varying results depending on screen / resolution / browser etc.
I thought maybe using height: auto; but no joy with that either.
I'm assuming it must be possible, as it seems a fairly basic layout requiement.
Thanks.
You have to use some style that forces that div to clear the floats (since floated elements are removed from the flow, containing elements act as if they aren't even there). To do that, something like "overflow:hidden" works wonderfully well. So remove the height:auto styles (which is the default anyhow), and change this -
#outerWrapper #contentWrapper #content #row_one {
width:580px;
border:2px solid #333;
background-color:#99FF99;
padding:10px;
to this -
#outerWrapper #contentWrapper #content #row_one {
width:580px;
border:2px solid #333;
background-color:#99FF99;
padding:10px;
overflow:hidden;
Similar Messages
-
Hi!
I have finally ditched tables and I'm now doing my first div-based css layout. At times I still feel totally lost like in this example. I can't seem to get the page subtitle ("Etusivu") to move down from the top of the div it is in. I tried different kinds of paddings and margins but either Firefox or IE always screws it up, even if I get it to work in the other browser. If anyone can take a look, I appreciate it a lot!
Here's my markup:
<!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>
<link href="styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
//-->
</script>
<style type="text/css">
<!--
.otsikko {
font-family: "Courier New", Courier, monospace;
font-size: 18px;
color: #FFFFFF;
font-weight: bold;
text-align: center;
.leipateksti {font-family: "Courier New", Courier, monospace}
.style1 {font-family: "Courier New", Courier, monospace; color: #FFFFFF; }
-->
</style>
</head>
<body onload="MM_preloadImages('images/doktor_streetwear_otsikko_ro.gif','images/etusivu_ro.gif ','images/tuotteet_ro.gif','images/tietoa_ro.gif','images/ehdot_ro.gif','images/palaute_ro .gif','images/linkit_ro.gif')">
<div id="wrapperi">
<div id="logo"><img src="images/kannulogo.jpg" alt="logo" /></div>
<div id="otsikko"><a href="index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('otsikko','','images/doktor_streetwear_otsikko_ro.gif',1)"><img src="images/doktorwear_otsikko.jpg" alt="otsikko" name="otsikko" width="487" height="87" border="0" id="otsikko2" /></a></div>
<div id="kielet">
<div id="kielet_pusher"> </div>
<div class="kieli">SUOMEKSI </div>
<div class="kieli">IN ENGLISH </div>
</div>
<div id="navi"> <a href="index.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('etusivu','','images/etusivu_ro.gif',1)"><img src="images/etusivu.jpg" alt="etusivu" name="etusivu" width="130" height="56" border="0" id="etusivu" /></a><a href="tuotteet.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('tuotteet','','images/tuotteet_ro.gif',1)"><img src="images/tuotteet.jpg" alt="tuotteet" name="tuotteet" width="130" height="55" border="0" id="tuotteet" /></a>
<a href="tietoa.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('tietoa','','images/tietoa_ro.gif',1)"><img src="images/tietoa.jpg" alt="tietoa" name="tietoa" width="130" height="55" border="0" id="tietoa" /></a>
<a href="ehdot.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('ehdot','','images/ehdot_ro.gif',1)"><img src="images/ehdot.jpg" alt="ehdot" name="ehdot" width="130" height="55" border="0" id="ehdot" /></a>
<a href="palaute.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('palaute','','images/palaute_ro.gif',1)"><img src="images/palaute.jpg" alt="palaute" name="palaute" width="130" height="55" border="0" id="palaute" /></a>
<a href="linkit.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('linkit','','images/linkit_ro.gif',1)"><img src="images/linkit.jpg" alt="linkit" name="linkit" width="130" height="55" border="0" id="linkit" /></a> </div>
<div id="vasen_palkki">Content for id "vasen_palkki" Goes Here</div>
<div id="main_content">
<div class="otsikko" id="tekstiotsikko">ETUSIVU</div>
<div class="style1" id="iso_alue">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nec risus at lorem posuere pellentesque. Sed a tellus lorem. Nullam justo mauris, ultrices sed interdum in, egestas eu leo. Duis interdum elementum gravida. Curabitur eu rutrum nibh. Maecenas molestie turpis ac leo tristique nec pellentesque felis mattis. Etiam placerat laoreet tortor, ac dignissim magna tempor ac. Mauris iaculis vestibulum pellentesque. Proin eu scelerisque ipsum. Sed tincidunt nibh sed ipsum pulvinar iaculis. Cras egestas imperdiet mi. Suspendisse tempus, tortor eget vehicula sagittis, diam massa lobortis odio, vel dictum risus nulla vitae mauris. Praesent tellus erat, pharetra eu fermentum vitae, sodales eu sapien. Aenean odio lectus, mattis in egestas id, auctor at nisl. Donec viverra pharetra auctor. Fusce lectus neque, ullamcorper a ultricies at, auctor at mauris. Proin semper orci quis risus dignissim non cursus tellus lobortis. In hac habitasse platea dictumst. </div>
</div>
</div>
</body>
</html>
And here's the stylesheet:
@charset "utf-8";
body {
background-color: #330000;
#wrapperi {
margin: auto;
padding: 0px;
width: 800px;
#logo {
float: left;
border: 1px solid #800000;
#otsikko {
float: left;
border: 1px solid #800000;
#kielet {
float: right;
border: 1px solid #800000;
height: 87px;
width: 130px;
.kieli {
font-family: "Courier New", Courier, monospace;
font-size: 18px;
color: #FFFFFF;
font-weight: bold;
border-top-width: 1px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #800000;
border-right-color: #800000;
border-bottom-color: #800000;
border-left-color: #800000;
padding: 5px;
#kielet_pusher {
height: 25px;
#navi {
border: 0px none #800000;
float: left;
width: 130px;
#navi img {
padding-top: 4px;
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #800000;
border-right-color: #800000;
border-bottom-color: #800000;
border-left-color: #800000;
padding-bottom: 4px;
#main_content {
#otsikko {
#tekstiotsikko {
margin-top: 30px;
margin-bottom: 30px;
#iso_alue {
font-size: 14px;
text-align: left;
margin-left: 160px;
margin-right: 200px;
#vasen_palkki {
float: right;
height: 400px;
width: 130px;
border: 1px solid #800000;
#main_content {Hi
As I am getting different layout (depending on browser), and you are missing much of the text mark-up (h1, h2, h3, p, etc.), which also changes the display, try replacing your section of the code with the one below, and let me know if this is somewhere near what you wish..
<div id="tekstiotsikko"><h2></h2></div>
<div id="iso_alue"><h2>ETUSIVU</h2><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nec risus at lorem posuere pellentesque. Sed a tellus lorem. Nullam justo mauris, ultrices sed interdum in, egestas eu leo. Duis interdum elementum gravida. Curabitur eu rutrum nibh. Maecenas molestie turpis ac leo tristique nec pellentesque felis mattis. Etiam placerat laoreet tortor, ac dignissim magna tempor ac. Mauris iaculis vestibulum pellentesque. Proin eu scelerisque ipsum. Sed tincidunt nibh sed ipsum pulvinar iaculis. Cras egestas imperdiet mi. Suspendisse tempus, tortor eget vehicula sagittis, diam massa lobortis odio, vel dictum risus nulla vitae mauris. Praesent tellus erat, pharetra eu fermentum vitae, sodales eu sapien. Aenean odio lectus, mattis in egestas id, auctor at nisl. Donec viverra pharetra auctor. Fusce lectus neque, ullamcorper a ultricies at, auctor at mauris. Proin semper orci quis risus dignissim non cursus tellus lobortis. In hac habitasse platea dictumst.</p> </div>
PZ -
This should be a quick one - I have just added in some links to the other countries on the page below. Basically all the links under the main Botswana image on the left hand side.
Trouble is, that they have knocked the second row of lodges down to their right (this is how they should appear: http://www.goodsafariguide.com/botswana/index.php)
I thought the culprit might be a clear:both; in the #outerWrapper #contentWrapper #content #row_two rule in the botswana_layout.css file, but apparently not.
If anyone could quickly spot how to fix this that would be great.
The page is here:
http://www.goodsafariguide.com/botswana/botswana.php
Thank you!Good news with the solution!
Iain71 wrote:
So its all looking as it should now:
http://www.goodsafariguide.com/botswana/botswana3.php
Its interesting that you mention the <a href="someurl.php"><div>Some content</div></a> thing. Although it seems to work, it wa something I wasn't entirely convinced was technically correct. I'm not sure how else you would do that though, and it seems a fairly common thing on sites (if not achieved the same way), ie having a large area that acts as a link. Maybe it should be contained in an outer DIV.
Thanks again for your help.
As I understand it, strictly speaking a <div> cannot be a link so, it should not be wrapped in an anchor tag. I think it has something to do with the fact that a <div> is a block level element and <a> is in line. This link http://htmlhelp.com/reference/wilbur/special/a.html is a reference for <a> it lists what other elements it can occur in and what it can contain. An <a> can be placed inside a <div> but not the other way around. Having said that, your use of the two elements kind of proves that they work but then you can fix wood together with nails and screws but some situations call for one or the other! Reading up on this, I learn that it's different now in HTML5 but then I imagine, that was done to confuse me!
The way I work out a page these days is based on my simple understanding of semantic code which for me means that the best element to use will always be the one that was intended for that job. The most obvious are <ul> and <li> for lists and <p> for a paragraph. I suppose <head> and <body> give even stronger clues. I also understand that search engines and in particular, Google, appreciate the proper use of these elements when pages are crawled. I know that SEO is a dark art but it kind of makes sense that a stupid robot will understand only the information is sees. It knows a list is a list but it doesn't know that a div is a list.
I have had a go at building your box of images using Dreamweaver Javascript rollover and the list elements. It's quick and dirty and the javascript makes it look more complicated than it is. However, if you compare my code with yours, I think that you will agree that my alternative is more straight forward and easier to read.
One other thing about this idea is that but putting your image in the page, you can get a bit more content in there with your alt="" and title"" attributes. At the moment, your option is a string of content-less divs.
martcol.co.uk/test/africa.html
Regards
Martin
You have to bear in mind that I am a serious hobbyist web developer who trys his hardest understand this shizzle. -
CSS layout question regarding browser sizing
Hi,
Basically I want the basis of my site to be - A header, Main content with a background image, A Footer.
I'm having problems however, I can't seem to get my footer to position where I want it i.e. at the bottom of the browser window at all times. I'm doing it as an AP div and how it should work is that it's fixed at the bottom of the page and then if the user resizes their browser in the y direction the footer moves up with it, over the top of the main content (but not the header which will have a higher z-index).
The way I THOUGHT to do it was to firstly create a div tag for the whole page (780 pixels wide, auto left and right margins, auto height) and then inside that put my ap div header fixed height at the top and have another ap div as the footer, fixed height and tell it to position 0 pixels from the bottom. However this doesn't seem to do the trick, I'm sure I'm missing something really really simple. Anyone who's vaguely familiar with the program will be able to answer this I'm sure. If my question isn't clear please let me know and I'll rephrase,
TaThere is no reason to use APDivs for such a simple layout. Default CSS positioning (which is no positioning at all) is typically all you need for most layouts. Build your HTML markup logically from top to bottom of page and your footer will naturally appear at page bottom.
Live Demo (view page source to see the code)
http://alt-web.com/TEMPLATES/Basic-1-col-fixed.html
Or, for a Sticky Footer using Fixed positioning:
http://alt-web.com/DEMOS/CSS2-Sticky-Footer.shtml
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
Beginners CSS layout question - expanding a layer and not overlapping another
Having got well and truly fed up of using tables to layout
pages I am trying to gem up on CSS layer based layout. All well and
good but despite the various tutorials I can't find an answer to
this question...
Q. I have a layout with layers to make a three column layout,
however, I want to have a footer section at the bottom of the page
that runs the same width as the three columns (you can see my WIP
example here
http://www.spiralfilm.com/clients/broadoak/index_css.html
). Problem is, as the centre section expands with more content, how
do I make that section expand and not overrun the current footer
section? I want it to expand like a table does and push the footer
down.
I'm sure it is simple but I just can't get my head around it!
Thanks in advance for any pointers...> However, is the use of div tags the way to seperate
blocks of content? The
> DW8
> help file seems a little unclear on this?
Yes, it would be one way to do that. A div tag is simply a
container for
other HTML elements, like a table. The problem you are having
comes with
using DW 'layers' to contain text. As Thierry suggested, this
is because
absolutely positioned elements (i.e., DW 'layers') are
removed from the
normal flow, preventing them from interacting with adjacent
page elements -
this means that when the text inside them expands, it will
begin to overlap
other content. See my demonstration of this here -
http://www.great-web-sights.com/g_layers-overlap.asp
Try these tutorials -
http://www.macromedia.com/devnet/mx/dreamweaver/css.html
http://www.macromedia.com/devnet/dreamweaver/articles/tableless_layout_dw8.html
http://www.macromedia.com/devnet/dreamweaver/articles/css_concepts.html
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Benfrain" <[email protected]> wrote in
message
news:elgpba$qds$[email protected]..
> Hi, thanks for those links. Sorry to confess they are
all a little beyond
> my
> knowledge. I will read on and see if I can understand
them.
>
> However, is the use of div tags the way to seperate
blocks of content? The
> DW8
> help file seems a little unclear on this?
> -
Only making baby steps in CSS still but I am learning a lot. Here's a link to the page I am trying to create: http://www3.telus.net/~jessum/details_layout.html
Here's what I have managed to create so far: http://www3.telus.net/~jessum/details.html
When explaining any steps please explain it using Dreamweaver. I will be looking in the code to see how it all works but I want to be able to get proficient using Dreamweaver so I can see how things flow etc. before I try and hand code.
Questions
1. Is it a good practice to use a "container" to hold all of the div's or is it better to start by adding a header without a container?
2. How can I centre a div in the page?
I read that to align the div so it's "centred' in the page I can use: margin: auto;
but I'm not sure how to do this. Please explain.
3. How do I remove the space around the "container"? I've set the margin and padding to: "0" but the space is still there.
Thanksosgood_ wrote:
Not sure where this notion of using the body as a container came from but for years a wrapper or container was considered standard practice.
The idea is being promoted by several of the most active and knowledgeable members of this forum. I think the idea first came from Altruistic Gramps, and I remember debating the issue with him about a year ago. It has also been picked up enthusiastically by Murray, and I've seen Nancy O suggest the same idea.
I've been doing a lot of research into CSS3 recently, and discovered that the Borders and Backgrounds module specifically advises against styling the <html> element (http://www.w3.org/TR/css3-background/#special-backgrounds). It doesn't give a reason for this recommendation.
I suppose the idea of giving the body a width instead of using a container might come from the HTML5 definition of the body as representing the main content of the document (http://dev.w3.org/html5/spec/the-body-element.html#the-body-element).
I suspect that this is likely to develop into the same type of fruitless argument as we had several years ago about the "superiority" of ems over pixels. Adding a single <div> to act as the container or wrapper for the content doesn't strike me as being less efficient. It also has the advantage of avoiding styling the <html> element. -
CSS Layout Questions [locked]
Here's a link to the page I am trying to create: http://www3.telus.net/~jessum/details_layout.html
Here's what I have managed to create so far: http://www3.telus.net/~jessum/details.html
When explaining any steps please explain it using Dreamweaver. I will be looking in the code to see how it all works but I want to be able to get proficient using Dreamweaver so I can see how things flow etc. before I try and hand code.
Questions
1. Is it a good practice to use a "container" to hold all of the div's or is it better to start by adding a header without a container?
2. How can I centre a div in the page?
I read that to align the div so it's "centred' in the page I can use: margin: auto;
but I'm not sure how to do this. Please explain.
3. How do I remove the space around the "container"? I've set the margin and padding to: "0" but the space is still there.
ThanksMurray *ACP* wrote:
You already have a "container" - the body tag. You can center the page by giving the body an explicit width and then left/right margins of auto, e.g.,
body {
width:960px;
margin:0 auto;
The idea of using the body to centre the page seems to have become fashionable of late. The problem with doing so is that it leaves an unstyled area on the body's background extends into the left and right margins when displayed on a screen that is wider than the body. So, followers of this fashion then style the <html> element.
The CSS3 Borders and Backgrounds module specifically advises against styling the <html> element. See http://www.w3.org/TR/css3-background/#special-backgrounds.
Message was edited by: David_Powers to correct description of what happens in the margins. -
CSS layout - how to get 100% height
I'm starting with a Dreamweaver template (2 column elastic,
left sidebar, header and footer). It's set up in CSS so that there
is a div container with a few other divs inside it. I want 100%
width and height. In the CSS for the container, I added width: 100%
and height: 100%. Width is now 100%, but height is not responding.
This is the only code I changed from the original template.
Any idea how to get my height to 100%?
Thanks!Google "Faux columns".
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"OxfordFishSalon" <[email protected]> wrote
in message
news:fvd5b0$t6k$[email protected]..
> Also, saw this post in another thread, which seems
helpful, but It'd be
> great
> if someone could elaborate on these methods a bit (faux
columns?):
>
>
quote:
Originally posted by:
Newsgroup User
> Sorry Snake, that's not a reliable method for a number
of reasons, not the
> least of which is that if you have a window height that
causes the content
> to be scrolled, the content will escape its box.
>
> Faux columns is the most reliable method to use,
although there are
> image-less methods using negative margin and padding
that will also work.
>
> --
> Al Sparber - PVII
>
http://www.projectseven.com
> Extending Dreamweaver - Nav Systems | Galleries |
Widgets
> Authors: "42nd Street: Mastering the Art of CSS Design"
>
>
> "SnakEyez02" <[email protected]> wrote
in message
> news:fl1ak3$9o5$[email protected]..
> > Check out this post:
> >
> >
http://www.webmasterworld.com/forum83/200.htm
> >
>
>
>
>
> -
Add AP Div to CSS Layout...
Hey,
I really need to add an AP Div to my CSS- Layout (3 column
absolutely positioned) ! No problem BUT i need it to shrink and
grow with the other parts of the page (sidebar1/2, main content,
header, footer etc..) In other words, I need a third sidebar in
this "CSS-Set"... How can I "attach" the apDiv's to the other Divs
such as main content, header... ?!
Thx for help !On Mon, 12 Jan 2009 15:47:54 +0000 (UTC), "hendrik.r."
<[email protected]> wrote:
> I really need to add an AP Div to my CSS- Layout (3
column absolutely
>positioned) ! No problem BUT i need it to shrink and grow
with the other parts
>of the page (sidebar1/2, main content, header, footer
etc..) In other words, I
>need a third sidebar in this "CSS-Set"... How can I
"attach" the apDiv's to the
>other Divs such as main content, header... ?!
The short answer is, you cannot. Absolutely positioned page
elements
cannot interact with other page elements because they are
removed from the
normal flow of the document. That's what makes absolute
positioning a bad
way to do most things.
Gary -
Using CSS I am attempting my first tableless page layout and
I am bumping up against a problem I cannot figure out. I am posting
this hoping that kind soul out there will take a drive by and tell
me what I'm doing wrong.
Testing with Firefox and IE6&7 for PC and Mac, Netscape
7.2 and Safari for the Mac, all seem to work. My HTML and CSS both
validated at W3C.
I initially worked out some bugs and it was working well
until I updated Netscape from 8.1 to 8.1.2. A rollover that belongs
on the farthest right is now pushed out of position and appears
below the masthead. Resulting in an additional scroll bar under the
masthead area and along the right side. My content appears below
this additional scroll bar.
You can see the page here:
http://www.voicedatacable.com/index2.html
The css is here:
http://www.voicedatacable.com/styles/main.css
To summarize, I have my div tags nested in this fashion:
<overall_page_container>
<masthead_container>
<masthead_row1 />
<masthead_row2_1 />(float: left)
<masthead_row2_2 />(float: left)
<masthead_row2_3 />(float: left)
<masthead_row2_4 />(float: left)
<masthead_row2_5 />(float: left)
</masthead_container >
<content_container />
<footer />
</overall_page_container >
I hope someone out there can tell me what I'm missing here.
Thanks in advance.Change this -
DIV#logo {
BACKGROUND: url(images/images/logo.gif);
FLOAT: left;
MARGIN: 0px 0px 0px 70px;
WIDTH: 225px;
HEIGHT: 150px
to this -
DIV#logo {
BACKGROUND: url(images/images/logo.gif);
FLOAT: left;
MARGIN: 0px 0px 0px 70px;
WIDTH: 225px;
HEIGHT: 150px;
DISPLAY:inline;
and see what happens.
It's the IE double margin bug.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"dog n' moon" <[email protected]> wrote in
message
news:e28epu$l3o$[email protected]..
> In Safari, the two top elements are horizontally level
with each other. I
> just
> checked on Win XP and the navigation cluster is below
the logo, so the
> float is
> not working...
> URL is:
>
http://hopehouseoc.com/admission.html
>
> any help with CSS floats or a better way to set these
two elements even
> with
> each other horizontally?
>
> thanks in advance
> -
Css layout problems - css and tables
Hi guys,
Well as some of you suggested months ago, I've been trying to
learn to layout with CSS... It's actually getting a bit rewarding
now as I start to figure a few things out but there's still plenty
of questions!!!
If anyone can take a look at what I'm working on at the
moment and give me some help I'd REALLY REALLY appreciate it!!
My main trouble (I think) is working with a drop-down menu
system that I found on the web and I'm dying to use it because it's
perfect for this design. It's layed out using a table so I'm trying
to incorporate that...
Click
[url=http://home.iprimus.com.au/jediwdog/ltc/mockup2.jpg]here[/url]
for a picture of what i'm trying to get this page to look like and
[url=http://home.iprimus.com.au/jediwdog/ltc/example1.html]here[/url]
to see how far I've got. You can download the stylesheet from
[url=http://home.iprimus.com.au/jediwdog/ltc/example1.css]here[/url].
Here's what I need to know:
1. I'm trying to push the table down so it looks better lined
up with the logo but when I tell it to be further from the top, it
doesn't seem to move. Any ideas on why?
2. As you can see, I've inserted some blank space into the
middle of the menu so that the logo doesn't cover any of the menu
items. I can't seem to get the same 1px black border on this
section.
I assume this is because the border on the other parts is a
layer/div border? Will I have to somehow put a div in there so as
to create the same border effect?
3. I'd really like to keep the header and footer visible at
all times, even if there's lots of content to scroll through. I
found this:
http://www.cssplay.co.uk/layouts/basics2.html#Top
but when I tried to implement this on my page, it all went haywire!
Is this going to be a possibility?
4. I guess other than that, have I completely stuffed this
up!? I don't think I have but it's worth asking I guess!
THANKS IN ADVANCE! I'm really loving using css layout rather
than tables - it's soooo much more versatile. I just need to get
past some obstacles I think!
Cheers
NeilOn Wed, 24 Jan 2007 22:17:20 +0000 (UTC), "Barb S."
<[email protected]> wrote:
>Ok, I made your suggested changes and have this:
>
> body {
> font-family: Georgia, "Times New Roman", Times, serif;
> text-align: center;
> font-size: 1em;
> font-style: normal;
> text-decoration: none;
> top: 15px;
> background-image:
url(/images/backgrounds/background1.gif);
> padding-top: 15px;
>>>> width: 70%;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> }
>
> #body {
> margin: 0 auto;
> text-align:left;
> width: 760px;
> padding-right: 20px;
> padding-bottom: 20px;
> padding-left: 20px;
> background-color: #FFFFCC;
> padding-top: 20px;
> font-family: Georgia, "Times New Roman", Times, serif;
> font-size: 1em;
> color: #003366;
>
> }
>
>
http://www.japanesetemari.com
>
> The page is on the left size of the screen and the
yellow box does not expand
>out. Not exactly what I'd wanted. I like to take
advantage of larger screens
>and have the page expand out but not so far out so the
lines of text are real
>long.
> Barb
It's this in the body style that is limiting the width -
change that
to 100%
>>>> width: 70%;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> }
~Malcolm N....
~ -
CSS Layout issue!! Help Urgent!!
I am having a problem with creating a css layout, in the past i used tables and am trying to convert my sites for my customers. I have layed out the website using divs and css and it looks great until i put in the cosing of the menu bar. when i put in the coding for the menu bar suddenly the bar has a padding around it but i cannot find a padding that would change this in the css coding. I need this done asap! so please help. ill show my coding below:
this is the div coding:
<div id=Nav>
<ul class="dropdown" id="Bar"; width: 879px" name="Bar">
<li class="style16" style="width: 161px; height: 22px">
<a href="default.html" style="width: 146px">Home</a></li>
<li class="style10" style="width: 169px; height: 23px">
<a href="about.html" style="width: 153px">About</a></li>
<li class="" style="height: 31px; width: 175px; left: 0px; top: 0px">
<a href="Equipment.html" class="style18">
<div class="style10" style="width: 156px; height: 20px;">
Equipment</div>
</a> <ul class="sub_menu">
<li><a href="compressor.html">Air Compressors</a></li>
<li><a href="compactions.html">Compaction</a></li>
<li><a href="concrete.html">Concrete Equipment</a></li>
<li><a href="forklifts.html">Fork Lifts</a></li>
<li><a href="generators.html">Generators</a></li>
<li><a href="groundthawing.html">Ground Thawing</a></li>
<li><a href="heaters.html">Heaters</a></li>
<li><a href="scissorlifts.html">Scissor Lifts</a></li>
<li><a href="boomlifts.html">Boom Lifts</a></li>
<li><a href="lighttowes.html">Light Towers</a></li>
<li><a href="misc.html">Misc.</a></li>
<li><a href="dirtequipment.html">Dirt Equipment</a></li>
<li><a href="powertools.html">Power Tools</a></li>
<li><a href="pumps.html">Pumps | Saws | Welders</a></li>
</ul>
</li>
<li style="width: 165px"><a href="locations.html">
<div class="style10" style="width: 154px">
Locations</div>
</a>
</li>
<li style="width: 180px"><a href="contact.html">
<div class="style16" style="height: 24px">
Contact Us</div>
</a> </li>
</ul>
</div>
This is the css coding:
#wrapper {
width: 880px;
margin-right: auto;
margin-left: auto;
background-color: #f4f4f4;
#Navigation {
background-image: url(Images/NAvigation%20BAr.jpg);
background-repeat: no-repeat;
width: 880px;
visibility: visible;
height: 3-px;
vertical-align: top;
Nav {
vertical-align: top;
margin: 0px;
padding: 0px;
clear: both;
height: 20px !important;
#wrapper1 {
width: 876px;
margin-right: auto;
margin-left: auto;
color: #F4F4F4;
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* Opera */
background-image: -o-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #716375), color-stop(1, #E8E8E8));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to right, #716375 0%, #E8E8E8 100%);
margin-bottom: auto;
#Bar {
background-repeat: no-repeat;
width: 880px;
height: 28pt;
overflow: visible;
background-image: url(Images/NAvigation%20BAr.jpg);
position: relative;
vertical-align: top;
#container {
width: 880px;
color: #000;
background-color: #EDEDED;
dominant-baseline: 578px;
/* IE10 Consumer Preview */
background-image: -ms-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* Opera */
background-image: -o-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(linear, left top, right top, color-stop(0, #716375), color-stop(1, #E8E8E8));
/* Webkit (Chrome 11+) */
background-image: -webkit-linear-gradient(left, #716375 0%, #E8E8E8 100%);
/* W3C Markup, IE10 Release Preview */
background-image: linear-gradient(to right, #716375 0%, #E8E8E8 100%);
margin-bottom: auto;
#content {
float: left;
color: #090;
width: 580px;
padding-right: 6px;
background-color: #033;
margin-top: 20px;
.container {
color: #000;
background-color: #ff6;
width: 876px;
#expect {
height: 164px;
width: 294px;
float: right;
position: relative;
background-color: #C90;
margin-left: 582px;
padding-top: 10px;
#hours {
float: left;
height: 55px;
width: 294px;
line-height: 4px;
word-spacing: normal;
white-space: normal;
display: inline;
letter-spacing: normal;
padding-top: 10px;
font-size: 13pt;
color: #000;
margin-left: 586px;
background-color: #F99;
#footer {
height: 76px;
width: 880px;
background-color: #CC0;
clear: both;
#cards {
float: right;
height: 31px;
width: 294px;
margin-left: 582px;
padding-top: 10px;
background-color: #F36;
#contact {
float: left;
height: 328px;
width: 293px;
word-spacing: normal;
white-space: normal;
line-height: 1px;
color: #000;
display: inline;
font-size: 14pt;
background-color: #FFF;
padding-top: 10px;
margin-top: 20px;
#header {
background-image: url(Images/Proquip%20Logo/Proquip%20logo2.jpg);
background-repeat: no-repeat;
background-position: center center;
width: 885px;
height: 126px;
background-color: #000;
margin-right: 2.5px;
margin-left: 0px;
#wrapper #container #contact p strong {
color: #800000;
font-size: 14pt;
#wrapper #container #contact blockquote p a {
color: #000;
#wrapper #container #expect div {
color: #900;
font-size: 14pt;
font-weight: bold;
#wrapper #container #hours div {
color: #900;
font-size: 14pt;
font-weight: bold;
#box2 {
background-image: url(Images/Option%201/Services/whitebox2.jpg);
#box3 {
background-image:url(Images/Option%201/Services/redbox2.jpg);
background-repeat:no-repeat;
background-position: center center;
#gold {
background-image:url(Images/Option%201/Logos/gold.gif);
background-repeat:no-repeat;
#white {
background-image:url(Images/Option%201/ProQuip-Pics/box1.gif);
background-repeat:no repeat;
#forklift {
background-image:url(Images/Option%201/ProQuip-Pics/34-01-4380.jpg);
background-repeat:no-repeat;
#scissorlift {
background-image:url(Images/Option%201/ProQuip-Pics/jlg-scissor-lifts-21.jpg);
background-repeat:no-repeat;
/* Navigation Menu- Level one */
ul {
list-style: none
ul.dropdown {
font-size: 13pt;
color: #000000;
height: 25px;
text-decoration: none !important;
width: 860px;
position: relative;
vertical-align: top;
ul#Bar.dropdown {
width: 878px;
position: relative;
vertical-align: top;
ul.dropdown li {
font-weight: 600;
float: left;
zoom: 1;
font-family: Arial, Helvetica, sans-serif;
font-size: 13pt;
display: block;
width: 175px;
color: #000000;
top: 25px;
text-decoration: none !important;
text-align: center;
ul.dropdown a:hover {
color:#cc0000;
ul.dropdown a:active {
color: #000000;
ul.dropdown li a {
display: block;
border-right: 1px solid#333;
color: #000000;
border-right-width: 1px;
text-decoration: none !important;
text-align: center;
ul.dropdown li:last-child a {
border-right:none; /* does not wotk in IE */
text-decoration:none !important; }
ul.dropdown li.hover,
ul.dropdown li.hover {
color: #000000;
position: relative;
height: 28px;
top: 0px;
ul.dropdown li.hover a {
color:#800000;
/* Level Two Navigation */
ul.dropdown ul {
width: 180px;
visibility: hidden;
position: absolute;
top: 100%;
left: 36%;
display: block;
float: left;
color: #000000;
text-decoration: none !important;
height: 25px;
ul.dropdown ul li {
font-weight: normal;
color: #000000;
border-bottom: 1px solid #ccc;
float: left;
border-bottom-color: #c0c0c0;
border-bottom-style: groove;
display: block;
background-color: #dbdbdb;
text-decoration:none !important;
/* IE 6&7 needs inline block */
ul.dropdown ul li a {
border-right: none;
display: inline-block;
height: 18px;
line-height: 16px;
color: #000000;
width: 100%;
text-decoration: none !important;
/* Level Three Navigation */
ul.dropdown ul ul {
top: 100%;
color: #000000;
text-decoration: none !important;
ul.dropdown li:hover>ul {
visibility: visible;
color: #000000;
top: 30px;
text-decoration: none !important;I have the site using tables up and running, this is a website for a client so I cant make a test site using that domain would it be ok if I screen shot'ed the problem?
Date: Thu, 24 Apr 2014 12:19:44 -0700
From: [email protected]
To: [email protected]
Subject: CSS Layout issue!! Help Urgent!!
Re: CSS Layout issue!! Help Urgent!!
created by Jon Fritz II in Dreamweaver support forum - View the full discussion
Well, you're not using position:absolute, so you've got a big thumbs up from a bunch of us for that.
Is there any chance you could post a link to this page on your server? It's much easier to troubleshoot from a browser than it is to rebuild the page from code fragments.
If you haven't gone live with the page yet, create a folder called TEST in your site and save copies of the page and css there. Upload TEST and post a link to it here. Once the problem is found/fixed, delete TEST from the server.
You can also attempt to use Firefox or Chrome to find your issue by right clicking > Inspect Element. All CSS that affects a given element will be displayed with file name and line numbers there.
Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6327947#6327947
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6327947#6327947
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6327947#6327947. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Dreamweaver support forum at Adobe Community
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0. -
Trouble Understanding CSS Layout and Padding
Hi,
I'm having some serious problems understanding CSS layout techniques and the impact of padding and was hoping I could get some help.
Here are a couple of pages that show examples of what I don't "get". The first has padding that causes the layout to look right. The second doesn't have padding but doesn't lay out as I would expect. Also, the amount of text affects the "bottom" div as well. I'm an old hand at HTML and could do this layout in my sleep using tables. Css is a different, frustrating story.
http://www.libertywebmarketing.com/test/1.html
http://www.libertywebmarketing.com/test/2.html
Thanks.
Fitz21Thank you for the help.There's a lot of valuable info in these answers that I'm going to have to study. I never thought of applying classes to Div tags, but I guess I have to start learning somewhere. I'm not sure how to use the technique, but I'll definately look into it. If I could wake up tomorrow and know what you all know simply by wishing it, I would.
I see that there are many things I have to learn about using CSS and I'd really like to see some real world examples that don't look like typical cheesy CSS designs with columns. If I were going to design this page using HTML, I would probably do something like this: http://www.libertywebmarketing.com/test/3.html
(The last two tables show the table structure and use of a spacer. I know this a seriously antiquated way of doing it, but it's to illustrate what I'm trying to accomplish: Namely, staggered, left/right alternating boxes that will expand properly depending on the amount of copy or the vertical height of the photo in them.)
Dreamweaver 101,
I have "Dreamweaver 8 The Missing Manual" by David Sawyer McFarland, but I find it really concentrates on "typical CSS designs" that look like Content mangement templates. While I agree it's a valuable book, there's nothing in there I have found that addresses anything like what I'm trying to do. Is the Dummies book better for atypical layouts?
Again, thank you all.
Fitz21 -
Rightio,
I'm fairly new to the coding/css game but I'm learning quite fast and recently I got hold of a template to mess around with. It came with a main page and two subpages, I opened the subpage and then created a new page in order to try something different, copying and pasting the subpages html and css.
What my problem is now, is that when I edit something in one of the subpages, it automatically changes the coding in the page in which I copied it to originally. I don't want to do this and I'm presuming there maybe some form of html or css code that's doing this?
could anyone shed some light, thanks in advance.Cheers again.
Although, I still havn't managed to sort it out. I also have no .dwt file.
The CSS is actually the only thing copying, as the HTML on either pages sticks to whatever I change it to.
I'm going to take the risk and post the entire css coding I have and maybe have one last crack at seeing if it can be figured out. (Although, If anyone can tell me another way to post it all, I'll delete and replace!)
Sorry for dragging this out but it's the only problem I have and the only one I really can't work out.
html, body {
height: 100%;
body {
margin: 0px;
padding: 0px;
background: #f0f0f0 url(images/subpage2_06.jpg);
font-family: Helvetica, Verdana, Sans-serif;
font-size: 13px;
color: #5E5E5E;
h1, h2, h3 {
margin-top: 0px;
p, ol, ul {
margin-top: 0px;
p, ol {
line-height: 175%;
strong {
color: #5E5E5E;
a {
color: #3e6e35;
a:hover {
text-decoration: none;
a img {
border: none;
img.border {
img.alignleft {
float: left;
padding: 5px 20px 0px 0px;
img.alignright {
float: right;
img.aligncenter {
margin: 0px auto;
hr {
display: none;
#wrapper {
background: #f0f0f0 url(images/subpage2_012.jpg) repeat-x left top;
.homepage #wrapper {
background: #f0f0f0 url(images/homepage01_1.jpg) repeat-x left top;
.container {
width: 1000px;
margin: 0px auto;
.clearfix {
clear: both;
/** HEADER */
#header {
overflow: hidden;
height: 137px;
background: url(images/subpage1_012.jpg) no-repeat right top;
/** MENU */
#menu {
float: left;
width: 650px;
height: 137px;
#menu ul {
float: left;
margin: 0px;
padding: 68px 0px 0px 90px;
list-style: none;
text-align: center;
#menu li {
display: inline;
#menu a {
display: inline-block;
margin-right: 0px;
text-transform: uppercase;
text-decoration: none;
font-size: 14px;
color: #FFFFFF;
#menu a:hover {
#menu li a span {
display: inline-block;
height: 23px;
padding: 40px 15px 10px 15px;
font-weight: bold;
color: #3e6e35;
#menu li.active a {
background: #3e6e35 url(images/homepage03_02.jpg) no-repeat left top;
#menu li.active a span {
background: url(images/homepage04_02.jpg) no-repeat right top;
font-weight: bold;
color: #f7f540;
/** SPLASH */
#splash {
width: 920px;
height: 188px;
padding: 112px 0px 0px 80px;
background: url(images/homepage05_03.jpg) no-repeat left top;
.subpage #splash {
width: 1000px;
height: 150px;
padding: 0px;
background: url(images/subpage2_022.jpg) no-repeat left top;
.single #splash {
width: 1000px;
height: 150px;
padding: 0px;
background: url(images/designer.jpg) no-repeat left top;
#splash p {
margin: 0px;
padding: 0px;
text-shadow: 1px 1px 1px #39A0B4;
color: #ffffff;
#splash .text1 {
text-indent: -9999em;
font-size: 30px;
#splash .text2 {
text-indent: -9999em;
margin-top: -5px;
font-size: 42px;
/** PAGE */
#page {
background: url(images/subpage2_04.jpg) repeat-y left top;
#page .bgtop {
overflow: hidden;
margin: 0px;
padding: 35px 0px;
background: url(images/subpage2_03.jpg) no-repeat left top;
.homepage #page .bgtop {
width: 940px;
padding: 0px 30px 35px 30px;
.subpage #page .bgtop {
width: 940px;
padding: 0px 30px 35px 30px;
/** CONTENT */
#content {
.subpage #content {
float: left;
width: 565px;
padding: 30px 30px 0px 30px;
background: url(images/homepage06.jpg) no-repeat right top;
.single #content {
width: 890px;
padding: 0px 55px;
/** SIDEBAR */
#sidebar {
float: right;
.subpage #sidebar {
width: 255px;
padding: 30px 30px 0px 30px;
/** FOOTER */
#footer {
background: url(images/subpage2_052.jpg) repeat-x left top;
height: 105px;
#footer p {
margin: 0px;
padding: 25px 0px 0px 0px;
text-align: center;
color: #FFFFFF;
#footer .legal {
#footer .links {
#footer a {
color: #FFFFFF;
.box-style {
.box-style .title {
margin: 0px;
padding: 0px;
letter-spacing: -1px;
font-size: 22px;
font-weight: bold;
color: #3e6e35;
.box-style .byline {
margin: 0px;
padding: 0px 0px 15px 0px;
font-size: 12px;
color: #7D7D7D;
.box-style .content {
.box-style .link1 a {
float: right;
width: 83px;
height: 26px;
margin: 0px;
padding: 2px 0px 0px 0px;
background: url(images/homepage07_02.jpg) no-repeat left top;
text-decoration: none;
text-align: center;
color: #ffffff;
#three-columns {
#three-columns .column2, #three-columns .column3 {
width: 315px;
#three-columns .column1 {
float: left;
width: 250px;
padding: 30px 30px 0px 30px;
background: url(images/homepage06.jpg) no-repeat right top;
#three-columns .column2 {
float: left;
width: 255px;
padding: 30px 30px 0px 30px;
background: url(images/homepage06.jpg) no-repeat right top;
#three-columns .column3 {
float: right;
width: 255px;
padding: 30px 30px 0px 30px;
ul.style1 {
margin: 0px;
padding: 0px;
list-style: none;
ul.style1 li {
padding: 20px 0px 30px 0px;
background: url(images/homepage11.jpg) repeat-x left top;
ul.style1 h3 {
margin: 0px;
padding: 0px;
font-weight: normal;
font-style: italic;
color: #3e6e35;
ul.style1 .byline {
margin: 0px;
padding: 0px 0px 10px 0px;
font-style: italic;
ul.style1 .first {
padding-top: 0px;
background: none;
<!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>The Carpet Emporium | Designer Flooring</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" />
<style type="text/css">
@import "layout.css";
</style>
</head>
<body class="single">
<div id="wrapper">
<div id="header" class="container">
<div id="logo">
<h1><a href="/index.html"> </a></h1>
<p> </p>
</div>
<div id="menu">
<ul>
<li><a href="/carpets" accesskey="1" title=""><span>Carpets</span></a></li>
<li class="active"><a href="#" accesskey="2" title=""><span>Designer Flooring</span></a></li>
<li><a href="#" accesskey="3" title=""><span>Laminate</span></a></li>
<li><a href="#" accesskey="3" title=""><span>Wood</span></a></li>
<li><a href="#" accesskey="4" title=""><span>Rugs</span></a></li>
</ul>
</div>
</div>
<div id="splash" class="container"> </div>
<div id="page" class="container">
<div class="bgtop">
<div id="content">
<div class="box-style">
<div>
<p><img src="images/axminster.jpg" alt="" width="150" height="60" class="alignleft" /><strong>Vestibulum commodo volutpat</strong> a etiam convallis ac, laoreet enim. Phasellus sed fermentum in, dolor. Pellentesque facilisis. Nulla imperdiet sit amet magna. Vestibulum dapibus, mauris nec malesuada fames ac turpis velit, rhoncus eu, luctus et.</p>
<li><a href="#">Adams Carpets</a></li>
<li><a href="#">Alternative Flooring</a></li>
<li><a href="#">Associated Weavers</a></li>
<li><a href="#">Axminster Carpets</a></li>
<li><a href="#">Brookway Carpets</a></li>
<li><a href="#">Cavalier Carpets</a></li>
<li><a href="#">Crucial Trading</a></li>
<li><a href="#">Cavalier Carpets</a></li>
</ol>
</div>
</div>
</div>
<div id="sidebar"></div>
</div>
</div>
</div>
<div id="footer">
<p>Copyright (c) 2011 The Carpet Emporium | www.thecarpetemporium.co.uk | All rights reserved.</p>
</div>
</body>
</html> -
Still practicing my CSS layout, and IE 7 issues.
I've revamped my site, and I've been practicing with the last 4 sites or so with mostly CSS layout....definitely a work in progress. My site is the first I've tried with overlapping images and the whole z-index thing. Everything looks great, for the most part. My issue is ALWAYS ie7, and then my issue is monitors with lower screen resolution. My sticky notes are showing up at the top of the page in IE7, looks great in 8. Every other browser seems to look great as well, as long as the resolution of the monitor is higher. I'm hoping someone can help me with positioning my sticky notes, so they don't shove my flash out to the right side of the page. Here's the URL www.theresasheridan.com.
Another site with another IE 7 issue....www.viewcamera.com. Here the issue is that the image in the maincontent div is shoved way down the page. I want to keep my width at 450 px so that I can have my side borders. Anyone have any other suggestions for me pretty please?
Last IE 7 issue (thanks so much), www.losvaquerosridingclub.org. The background color is white under the spry menu, but again...only in IE7.
Thank you!!You are absolutely right about the validator. Some of it is way beyond me too!
However, it seems to indicate that you have some tag confusion going on there, usually that's about missing a closing element. Fixing that is a good thing because it can screw your layout. Another thing the validator points out is the omission of a few of your alt="" text. That won't muck about with any layout issues but is worth adding if you have the time or inclination. I'm afraid I don't have time to look right now but if I get the chance I'll have a go later.
With your sticky notes, it struck me that you could use absolute positioning. The trick there is to place those elements in to a containing element, set that element to position: relative and then absolutely position the sticky notes using px dimensions where you want them in the page. At the moment, you are using floats on those two parts of the page but again, I haven't quite got the time to look in detail now.
With the float drop thing and width, you would do well to Google "Box Model CSS" or something similar. Width is not just the content width but also takes into account margin, border and padding. When you add those up, the width may be too big for the containing element width which will cause the content to "drop" or to be forced into a space that can accommodate it. The other snag with the Box Model is that different Browsers handle it differently. Sometimes what you need to do to create space in the page is to put padding on the nested element which constrains it's content without affecting the width of the container.
I'm a bit of a novice myself at this and it sounds a lot to get your head around. However there is a a logic to it and once you crack it, it gets easier.
One other tip is to use FireFox browser and get the Firbug plug-in. That lets you view the page in the browser and you can tweak your CSS "live" to get an idea of how things work together. Once you have what you want you then turn to DW to make your edits.
I hope that helps rather than misleads! As I say, I'll try to look later on but in the mean time, an expert might drop by.
And while I'm here, my feeling is that you might have done better to put each of your queries in different threads. Sometimes, to see several questions in one hit is a bit daunting and I think people here tend to leave the longer questions a bit until they have time.
Regards
Martin
Maybe you are looking for
-
Mac pro cannot boot after upgrade to 10.8.3
My Mac Pro cannot boot after upgrade to 10.8.3. Anything firmware I can reset or how should I do. I am using a early 2008 Mac Pro
-
Does anyone know of an app like this....
Hello All: I am looking for an app that will track how much time I spend in each application. Then possibly tell me in a report what time is being spent where. Not a manual one where I have to activate or tell it when I switch to a program but someth
-
Mavericks Finder crashes - Without Google Drive
Hi Everyone, So - I decided to upgrade to Mavericks last weekend, finally sick of being unable to use a couple of apps that I REALLY wanted, which no longer support Lion. Thinking that I had heaps of time on Sunday, I started the upgrade and left my
-
hi I have created one PO and two different (two times) GRN done for same po however at the time tof inoice posting (MIRO) with refeence to first DC, system has display full qty of grn (sum of two different dc qty). can you help the same issue. reg m
-
Bug: Flash CS5+CS4 Professional crashes when compiling AS2 classes.
My name is Mario Gomes Cavalcanti, I'm the CEO of Mersica Inc. and the developer of the free, online graphic design software, image and photo editor Fatpaint.com. Fatpaint is a Flash application, made using the Actionscript 2 programming language. Th