CSS - Boxes Sitting Differently On Diff Monitors?
Hi,
As you no doubt can tell from the title of this thread I'm a newb. I'm familiar with html but moving into learning css. Self taught, I no doubt have a lot to learn but I'm attempting to alter a template and would really appreciate some assistance. The site is www . inspirationz . info. I look at the site on my main monitor which is a large one and all looks fine. The two boxes in the main content area sit side by side, however when I look at it on my laptop or on a smaller monitor the navigation box on the right appears to sit still to the right, but beneath the box on the left. It didn't appear this way in firefox browser at first on my laptop, only Internet Explorer, but it appears that way on my other pc monitor in firefox so I assume it's likely to be a coding error. I have included some of the stylesheet coding below. Is anyone able to help me work out what's causing this? Thank you in advance. /*================================================================ Typography and links ==================================================================*/ a:link, a:visited { color: #999999; text-decoration: none; } h1 a:link, h1 a:visited, h2 a:link, h2 a:visited, .sidebar_nav a { text-decoration: none; } h1, h2, h3, h4, h5, h6 { font-size: 1em; font-weight: bold; letter-spacing: .16em; } .featured h2 { font-size: 1.8em; font-weight: normal; text-transform: uppercase; } .post_header h2 {font-size: 1.2em; font-weight: normal; margin-top: 10px;} .post_header_page h1, .post_header_single h1 { font-size: 2em; font-weight: normal; text-transform: uppercase; } #footer h3 {margin-bottom: 25px; border-bottom: 1px dotted gray; padding: 5px;} .featured p { font-size: .8em; font-style: italic; } p { margin: 15px 0px; } .post_body_page p, .post_body_single p {margin: 0; padding: 15px 0px;} small { font-size: 0.8em; font-style: italic; } strong {font-weight: bold;} .post_body p { font-size: 1em; margin: 10px 0px; } .more { margin-top: 10px; margin-right: -10px; float: right; } .more_big { margin-top: -20px; margin-right: 20px; float: right; width: 139px; height: 73px; } .footer_comments { float: left; margin-left: 20px; margin-top: 20px; } .comment_count { font-weight: bold; font-size: 1.8em; } .featured_datetime {margin: 6px 0px} .featured_more { float: right; font-weight: bold; margin-right: 20px; text-decoration: underline; } .post_body_page ol, .post_body_single ol { list-style-type: upper-roman; margin: 30px 0px; } .post_body_page ol li, .post_body_single ol li { list-style-type: upper-roman; margin-left: 60px; } .post_body_page ul, .post_body_single ul { list-style-type: upper-roman; margin: 30px 0px; } .post_body_page ul li, .post_body_single ul li { list-style-type: disc; margin-left: 60px; } blockquote { margin: 0px 30px; padding: 20px; border: 1px dotted gray; font-style: italic; } /*================================================================ Site Structure ==================================================================*/ body { font-size:100%; line-height:1.125em; font-family: Georgia, "Times New Roman", Times, serif; background-color: #f0f0f0; background-image: url(images/index/body.jpg); background-repeat: repeat-x; color: #7C7C7C; } #page_wrapper { width: 976px; margin: 0px auto; position: relative; } #featured { height: 230px; margin-right: 3px; margin-bottom: 30px; border: 0px solid red; padding: 15px; background-image: url(images/index/featured.jpg); background-repeat: no-repeat; } #header { width: 667px; margin: auto; height: 109px; background-image: url(images/index/header.jpg); } #container { width: 990px; margin: 140px auto; font-size:0.875em; } #main_content_left_index { width: 600px; float: left; } #main_content_left { width: 600px; float: left; } #main_content_right { width: 343px; float: right; } #footer { height: 250px; padding: 130px 130px 50px 130px; margin: auto; clear: both; background-color: #eeefef; background-image: url(images/index/footer.jpg); background-repeat: repeat-x; background-position: top; } #footer_contents {width: 990px; margin: auto;} #footer_left {width: 460px; margin: auto; float: left;} #footer_right {width: 460px; margin: auto; float: right;} /*================================================================ The columns ==================================================================*/ #first_column { float: left; width: 280px; } #second_column { float: right; width: 280px; } /*================================================================ The posts ==================================================================*/ .posts { background-image: url(images/index/posts.jpg); height: 333px; width: 275px; margin-bottom: 60px; } .post_header { height: 38px; width: 255px; padding: 10px; border: 0px solid red; } .post_body { width: 255px; height: 180px; padding: 10px; overflow: hidden; font-size: .9em; } .post_footer { height: 58px; width: 275px; margin-top: 15px; } .post_header_page, .post_header_single { background-image: url(images/index/PostHeaderPage.jpg); height: 38px; width: 547px; padding: 25px; text-align: center; } .post_body_page, .post_body_single { background-image: url(images/index/PostBodyPage.jpg); background-repeat: repeat-y; width: 547px; padding: 0px 25px; } .post_footer_page, .post_footer_single{ clear: both; background-image: url(images/index/PostFooterPage.jpg); height: 90px; width: 477px; margin-bottom: 20px; padding: 0px 60px; font-style: italic; } .next_prev { border: 0px dotted gray; height: 29px; clear: both; margin-bottom: 20px; background-image: url(images/index/next_prev_posts.jpg); width: 577px; padding-top: 10px; padding-right: 10px; padding-left: 10px; } .next_prev_comments { border: 0px dotted gray; height: 29px; clear: both; margin-bottom: 20px; background-image: url(images/index/next_prev_comments.jpg); width: 535px; padding-top: 10px; padding-right: 10px; padding-left: 10px; } /*================================================================ The sidebars ==================================================================*/ .sidebar_header { background-image: url(images/index/sidebar_header.jpg); height: 91px; width: 340px; } .sidebar_body { display: block; float: left; margin:0 0 0px 0; width: 290px; padding: 25px; background: url(images/index/sidebar_body.jpg) repeat-y; } .sidebar_bottom { background-image: url(images/index/sidebar_footer.jpg); height: 56px; width: 340px; clear: both; margin-bottom: 40px; } /*================================================================ Sidebar Navigation ==================================================================*/ .sidebar_nav ul {} .sidebar_nav li {} .sidebar_nav ul li { display: block; padding: 4px; border-bottom: 1px dotted #515151; font-size: .8em; } .sidebar_nav ul ul li {margin-left: 10px; border-bottom: none; font-size: 1em;} .sidebar_nav ul ul ul li {margin-left: 10px;} .sidebar_nav { margin-bottom: 20px; } .sidebar_nav ul { } .sidebar_nav a {display: block; padding: 4px; } .sidebar_nav a:link, #navlist a:visited { color: #666666; text-decoration: none; } .sidebar_nav a:hover { background: #d8d8d8 } /*================================================================ Top navigation ==================================================================*/ #top_nav_menu { position: absolute; top: 132px; left: 0; width: 950px; } /***** drop menu *****/ #dropmenu, #dropmenu ul { list-style-positionutside; position:relative; line-height:1.5em; z-index:300; width:100%; font-weight: normal; letter-spacing: .18em; margin: 0px 0px 0px 0px; } #dropmenu a { display:block; padding: 5px 15px; text-decoration:none; color: #666666; font-size: 1.2em; font-family: Georgia, "Times New Roman", Times, serif; letter-spacing: .18em; } #dropmenu a:hover { color:#000; text-decoration: underline; } #dropmenu li { float:left; position:relative; } #dropmenu ul { position: absolute; display: none; width: 18em; top: 1.9em; left: 0px; } #dropmenu ul a { background: url(images/index/dropmenu_bg.png) } #dropmenu ul a:hover { } #dropmenu li ul { width:14.1em; margin-top: 4px; } #dropmenu li ul a { width: 250px; height: auto; float: left; } #dropmenu ul ul { top:auto; } #dropmenu li ul ul { left: 265px; margin:0px 0 0 10px; } #dropmenu li:hover ul ul, #dropmenu li:hover ul ul ul, #dropmenu li:hover ul ul ul ul { display:none; } #dropmenu li:hover ul, #dropmenu li li:hover ul, #dropmenu li li li:hover ul, #dropmenu li li li li:hover ul { display:block; } /*================================================================ Categories Navigation ==================================================================*/ #main_categories { margin: auto; height: 20px; width: 976px; margin-bottom: 30px; } /* Horizontal Category List (frontpage) */ ul.horizontal_categories { clear: both; } .horizontal_categories li { display: inline; background: url(images/index/cat_bullet.png) no-repeat right center; font-size: 1.2em; font-weight: bold; letter-spacing: .08em; } .horizontal_categories a { padding: 0px 25px; } .horizontal_categories a:link, .horizontal_categories a:visited { } .horizontal_categories a:hover { } Similar Tutorialsi have a two div tags but the upermost tag sits outside the boundary of the one below and the page seems to be over stretched in IE7 the page address is www.ftpimage.com does anyone have any suggestions my css is as follows Code: body { margin: 0px; background: url(../img/top_bg.gif); background-repeat: repeat-x; font-family: Verdana, Arial, sans-serif; font-size: "15"; } p { line-height: 50px; margin: 11px 0 10px 0; padding: 0px; } h2 { color: #9f9f9f; margin:0px; padding:0px; font-size: 15px; } ul { font-size: 10px; margin:0; padding:0; list-style-image: url(../img/bullet.gif); } a { color: #93B300; } a:hover { text-decoration: none; } blockquote{ background: #F7FDE3; color: #606060; padding: 0px; } /**** Main Container ***/ #wrap { margin-left: 10px; margin-right: auto; width: 640px; } /**** Top ***/ #top { width: 155%; height:85px; color: #fff; background: #000 url(../img/top_bg.gif); overflow:hidden; } #top h2 { color: #87CEFA; letter-spacing: 3px; font-size: 2.4em; font-weight: normal; position: relative; margin: 0px; top: 33px; display: block; float: left; background: url(../img/bg_t.gif) no-repeat; padding-left: 8px; } #top h2 a { color: white; text-decoration: none; } #top h2 a:hover { color: #93B300; } #page { margin-right: 20px; max-width: 10px } /**** Main Menu ***/ #menu { display: block; float:right; } #menu ul { margin: 0; list-style: none; } #menu li { display: block; float: left; white-space: nowrap; } #menu li a { display: block; padding: 20px 10px 12px 20px; text-decoration: none; color: #fff; font-weight: bold; } * html #menu a {width:1%;} #menu li a:hover { background: url(../img/bg_menu.gif); } #menu li a.current { letter-spacing: 1px; color: gray; background: url(../img/bg_menu.gif); } #menu li a.current:hover { color: #fff; } /**** Content Container ***/ #content { width: 65%; margin-top:30px; border: solid 2px black; } #content h2 { margin: 0; padding: 10px 0 10px 0; } /**** Content ***/ #left ul { padding: 15px 0 15px 35px; margin:0; } #left li { margin-bottom:5px; } #left .box { width: 390px; float:left; display: block; margin-left: 20px; display: inline; } /**** Sidebar ***/ #right { width: 315px; float: right; display:block; margin-top: 10px; } #right .box { width: 20em;/*280px*/ background: #87CEFA; border: 1px solid #E1E1E1; padding:10px 10px 55px 10px; float: right; } #right .box h2 { font-size: 3.1em; margin: 0px 0 0px 0; padding:0px 0 5px 0; } #right .box a { margin: 10px 0 10px 0; color: #93B300; font-size: 20px; } #right .box p { margin: 5px 0 10px 0; line-height: 15px; } #right .box ul { padding: 0 0 0px 20px; margin:10px 0 10px 0; } #right .box li { margin-top:5px; } html>body .box { width: auto; min-width: 20em; } #nav{ list-style: none; margin: 2.0em 0; width: 25em; float: right;} #nav li{ padding: 0; margin: 0; } #nav a{ display: block; height: 2.0em; padding: 0.3em 0.3em 0.3em 0.8em; border:solid; border-width:medium; border-bottom: 2px; /*solid #1a1a1a*/ border-top: 2px; /*solid #1a1a1a*/ border-color:Black; color: black; background-color: #87CEFA; font-weight: bold; text-decoration: none; font-size:medium } #nav a:hover{ color: #1a1a1a; background: url(../img/bg_t.gif) no-repeat; background-color: #fff; font-weight: bold; } /**** Clear Div ***/ #clear { display: block; clear: both; width: 100%; height:1px; overflow:hidden; } /**** Footer ***/ #footer { margin: 40px auto 0 auto; text-align: center; border-top: dotted 1px gray; padding: 20px 0 20px 0; width: 70%; } #footer p { margin: 0px; padding: 0; Hello, I'm working on some really simple CSS and it's giving me wildly different results in Firefox and in IE. Here is the stylesheet: PHP Code: body { background-color: #DECFEF; } .example { background-image: url("images/example.gif"); border-width: thin; border-color: white; border-style: solid; padding: 35px 35px 35px 35px; } And here is the HTML file: PHP Code: <html> <head> <title>Chatterbox</title> <link rel="stylesheet" type="text/css" href="/teststyle.css"> </head> <body> <table class='example'><tr><td> hello </td></tr></table> </body> </html> All of this works (the image in the background, the white border, etc.) except the padding! In IE there is no padding at all, but in Firefox there is 35px padding, as specified in the stylesheet. You may see this yourself if you go to this URL in the two different browsers: http://www.chatterboxletters.com/test3.html Any help is greatly appreciated ~j. I have a div that should be sat at the bottom of its containing div (absolute positioned, bottom: 0, right 0) and it does so in Firefox, but in IE it is raised by about 20px or so. Any help to iron this out would be great. The page and its effects can be seen at www.prioritypie.f2s.com/KSA/KSA6/index.htm and the css at www.prioritypie.f2s.com/KSA/KSA6/styles/KSA6style.css It's the "menuContainer" div which isn't sitting right, nested in the "header" div. Many thanks for any help Hi Um basically I have 2 divs inside in another main layout div, and basically i cant get them to sit to there is no space between them in IE, in firefox its fine. if you go here and open it in firefox then IE you'll see what i mean, any ideas? Html: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html> <head> <title>lost layout test</title> <link rel="stylesheet" type="text/css" href="layout.css" /> </head> <body> <div id="outerBox"> <div id="topBox"> <div id="leftTop">left part1</div> <div id="rightTop">right part1</div> </div> </div> </body> </html> CSS: (not all is used in this example) Code: body { background: url("images/grad_bg.jpg"); background-color: #d53e3e; background-repeat: repeat-x; text-align: center; } #outerBox { width: 700px; height: 800px; margin-left: auto; margin-right: auto; background-color: purple; padding: 0px; margin-top: 0px; border: 0px; } #topBox { width: 700px; height: 200px; color: white; text-align: left; padding: 0px; margin: 0px; background-color: green; border: 0px; } #leftTop { width: 500px; height: 200px; background-color: pink; padding: 0px; margin: 0px; float:left; border: 0px; } #rightTop { height: 200px; margin-left: 500px; background-color: orange; padding: 0px; border: 0px; } #bodyBox { width: 700px; height: 540px; color: red; background-color: blue; float:left; text-align:left; } #leftContent { width: 500px; height: 540px; background-color: blue; } #rightContent { width: 200px; height: 540px; background-color: grey; float:right; } #footBox { height: 60px; width: 700px; color: red; text-align: left; background-color: black; float:right; } Hi again, i've built an image gallery using an unordered list and php to grab 'em from the database. when you first go to the page (both in FF and IE) the footer bar sits in the middle of the page, until you refresh, then it's fine. same thing happens when you click to enlarge it. Here's the page Here's the CSS; Code: /* SHOWCASE STYLE - firefox */ html>body ul.showcase { margin:5px 1px; margin:auto; list-style: none; width:760px; } html>body li.showcase { margin-top:5px; margin-left:10px; float:left; width:180px; } /* SHOWCASE STYLE - IE */ * html ul.showcase { margin:5px 1px; margin:auto; list-style: none; width:750px; } * html li.showcase { margin-top:5px; margin-left:8px; float:left; width:179px; } img.showcase { border:1px solid #CCCCCC; } i'm sure it's somethin' to do with clearing the floats, but i just don't get why it's cool after you refresh. thanks! hi, I have a problem with my website. On one of my computer my website proportions look right, but on my other computer it looks proportioned different. On my Computer everything is ok,but on my friends computer the web pages are not good. the css styles are ok but some images are bigger and some are small.how to solve this problem thanks mrjameer Probably a simple question and I'm hoping there is a link that someone can post where I can learn about the difference of using #/. in CSS. Eg., some CSS don't use anything, some use a # and some use a full-stop before the element: Code: body { code here; } #leftcolumn { code here; } .someelement { code here; } I am fairly new to css and am working on a login box that has a bar at the top. I'm doing one div to hold the title and another div below it which holds a table with login/password and buttons etc. I want to be able to use this in my css so that I can apply a titlebar with a simple css command. Anyway...that's getting away from the original question. Thanks for any help. Thanks for taking the time to read my question. I'm trying to center my nav bar. IE looks pretty close but FF is too far to the right. I cannot figure out why. Any ideas? Index2 Thanks for your help. oh ya, if you look at the page in IE, there is Red background behind the nav bar and in the main section, but in FF the Red is just in the main section. Not sure why. The red is there just for dev purposes, it's not staying. I know... it's ugly. Brad Thanks for taking the time to read my question. I am setting the font size for this tag in CSS and it is showing up in different sizes depending on the browser. The font is bigger in FF than it is in IE7. My text fits in the desired area in IE7, but is way to big in FF. I have to be doing something incorrect here. Does anyone notice anything? Thanks, Brad HTML: Code: <p id="FillText">Click on an item under <strong>'Latest News'</strong> to read more about it here and get links to the full story...</p> CSS: Code: #FillText { font-size: 16px; color: #ffffff; height: 280px; padding-top: 20px; padding-left: 90px; padding-right: 15px; /*padding: 30px 34px 20px 96px; */ text-indent: 20px; } Hi guys, I've been working on my CSS for a short while now. I'm attempting to get a "layout" for my site that I can work with, and I thought that a table-less layout was the way to go. I had a few problems initially with CSS and posted some code on here, and was lucky enough to get the help of an expert. He pointed out that I needed Doctypes, character sets and so on and helped me get started. I spent a "bit" of time at work doing a bit more to the page and was really pleased with the result - see attachment. I know it is currently quite crude (and the colours are appauling!) but it's practice. I then took my work home and opened it on my computer, and it has fallen apart AGAIN. I cannot believe that it can look so different in the SAME browser on different computers. At home I am using IE 6.0.2900... on WinXP SP2 At work I am using IE 5.50 on Windows 2000 SP4 I am getting so frustrated that everything in CSS seems to involve having little "extra bits" here and there to make work in each browser (or the same browser, different versions!), when the whole idea was to reduce coding and make life easier. I know that I have not posted any code, which could make helping me out difficult....but just by looking at the images below, does it look like I need a simple "hack" (whatever they are!) - ChiefWigs spoke about using an <! IF IE... comment to help out. Or should I look at just reducing everything by a pixel or two to make it fit...and just accept that gaps will be slightly larger on other browsers? It might be worth noting that I am using absolute dimensions (px) for the panels and menu holders...but relative widths (em) for things like the hyperlink boxes... I'm getting really depressed about the whole CSS thing, its already putting me off continuing to learn . If anyone could offer me help I would be very grateful. Regards, Porky Ok so I got a big one here... At least it is to me. I know absolutely NOTHING about CSS. I use GoDaddy.com and their program WebSite Tonight to build my website. http://www.thebdsmith.com My problem is this. I build the site using a Macbook Pro 15 inch. I always felt I was rather limited with space. I was on my brother in laws computer, he has a PC with a widescreen monitor. When viewing the site on HIS computer there was so much empty space on the right hand side. So I got excited and redesigned the site (after redesigning just 2 a week earlier). The outcome was so much better than before. NOW, this is the problem. When I go back to my Macbook area is missing again and I have to scroll right to see it. I do NOT like that. I emailed GoDaddy support one guy gave me the dumbest reply I've ever heard that was the OPPOSITE of what I had stated. Another said my template design is a fixed width and I'd have to edit the CSS coding to fix it. I don't know where in the CSS code to edit. This is GoDaddy default CSS that I am just wanting to edit and reuse. I know nothing of CSS so I don't see why not. Code: /** * @file * @project 675 * @package sftheme * @site app1 */ /** * ------------------------------------------------------------------ * @section RESETS * ------------------------------------------------------------------ */ body { width: 100%; height: 100%; margin: 0; padding: 0; border: 0; font-family: Verdana, Geneva, Kalimati, sans-serif; font-size: 11px; color: #ffffff; background-color: #051417; background-image: url(images/675_background.jpg); background-position: center top; background-repeat: no-repeat; } a:link{color: #ffffff;} a:visited{color: #ffffff;} a:hover {color: #ffffff;} .sf_navigation ul li a {color: #ffffff;} .sf_navigation ul li a:visited {color: #ffffff;} .sf_navigation ul li a:hover {color: #ffffff;} .sf_navigation .subnav li a {color: #ffffff;} .sf_navigation .subnav li a:visited {color: #ffffff;} .sf_navigation .subnav li a:hover {color: #ffffff;} .sf_footer {color: #ffffff;} .sf_pagetitle {color: #ffffff;} /*(WST Only)*/ .sf_outer_wrapper { } .sf_main_header { color: #ffffff; font-size: 32px; font-family: Verdana, Geneva, Kalimati, sans-serif; padding-left: 29px; } .sf_pagetitle { font-family: Verdana, Geneva, Kalimati, sans-serif; font-size: 24px; font-weight: normal; margin: 0; padding-top: 0px; } .sf_pagetitle h1{ font-family: Verdana, Geneva, Kalimati, sans-serif; font-size: 24px; font-weight: normal; margin: 0; padding-top: 0px; } /** * ------------------------------------------------------------------ * @section HEADER * ------------------------------------------------------------------ */ .sf_outer_wrapper { border-left:1px solid #2D4461; border-right:1px solid #2D4461; } * html .sf_outer_wrapper { width: 1200px; } .sf_main_wrapper{ width: 600px; float: left; margin-left: 67px; } * html .sf_main_wrapper{ margin-left: 0px; } .sf_wrapper { margin:0 0; padding:0px 10px; width: 1000px; } * html .sf_wrapper { width: 1200px; } .sf_wrapper:after { clear:both; content:"."; display:block; font-size:1px; height:0pt; visibility:hidden; } .sf_region3 { height: 150px; } .sf_main_header { padding-top: 33px; margin: 0px 33px; color: #FFFFFF; } /** * ------------------------------------------------------------------ * @section NAVIGATION * ------------------------------------------------------------------ */ .sf_region4 { float: left; font-size: 14px; width: 200px; overflow: visible; float: left; padding-bottom: 50px; padding-right: 50px; text-decoration: none; margin-top: 53px; margin-left: -24px; .margin-left:-14px; } .sf_navigation .nav a { width: 139px; padding: 10px; font-size: 18px; } .sf_navigation .sf_first_nav_item { background-repeat: no-repeat; background-position: 0px 0; padding-top: 12px; border: 0; } .sf_navigation { float: left; padding-bottom: 50px; padding-right: 50px; text-decoration: none; margin-top: 0px; width: 159px; margin-left: 77px; z-index: 1000; position: relative; } * html .sf_navigation { margin-left: 33px; } .sf_navigation .nav .subnav a { background-image: none; font-size: 12px; padding-bottom: 12px; padding-top: 12px; background-color: #051417; background-repeat: no-repeat; background-position: top right; border: none; z-index: 1000; } .sf_navigation .nav .subnav a{ background-color: #051417; color: #ffffff; } .sf_navigation .nav .subnav a:link{ background-color: #051417; color: #ffffff; } .sf_navigation .nav .subnav a:visited{ background-color: #051417; color: #ffffff; } .sf_navigation .nav .subnav a:hover { background-color: #051417; color: #ffffff; } .sf_navigation ul { padding: 0 0 12px 0; margin: 0; list-style: none; float: left; background-position:0 bottom; background-repeat:no-repeat; } .sf_navigation:after { content: "."; display: block; visibility: hidden; height: 0; font-size: 1px; clear: both; } .widget { margin-left: 24px; } * html .widget { margin-left: 24px; } .sf_region4 .sf_navigation .nav a:hover { text-decoration: none; } .sf_navigation ul li { float: left; } .sf_navigation ul li a { width: 214px; display: block; text-decoration: none; padding: 0; padding-bottom: 12px; width: 200px } .sf_navigation li ul.subnav { padding: 0; margin: 0; list-style: none; float: left; width: 160px; position: absolute; left: -999em; margin-left: 158px; margin-top: -43px; z-index: 1000; padding:5px 5px 0; background-image: none !important; background-color:#051417; } .sf_navigation .subnav li { float: left; margin-bottom: -1px; width: 176px; } .sf_navigation .subnav li a { width: 11em; display: block; color: #000000; text-decoration: none; padding: 0; margin-bottom: 0px; } .sf_navigation .subnav li a:visited { color: #000000; } .sf_navigation .subnav li a:hover { color: #000000; text-decoration: none; } #Nav1 li:hover, #Nav1 li.hover { position: relative; } /* lists nested under hovered list items */ #Nav1 li:hover ul, #Nav1 li.sfhover ul { left: auto; } #Nav1 iframe{ position: absolute; left: 0; top: 0; z-index: 0; display: none; } * html #Nav1 iframe { display: inline; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0); } .sf_navigation .widget_header{ display: none; } .sf_navigation ul.subnav a { color: #FFFFFF; } .sf_navigation ul.subnav a:hover { color: #a4bedf; } .sf_navigation ul.subnav a:visited { color: #FFFFFF; } /** * ------------------------------------------------------------------ * @section MAINCONTENT * ------------------------------------------------------------------ */ .sf_pagetitle { margin-left: 316px; width: 600px; margin-bottom: 20px; padding-bottom: 10px; } * html .sf_pagetitle { margin-left: 5px; } .sf_pagetitle h1 { padding-right: 22px; } .sf_main_wrapper { margin-top:-25px; padding-bottom: 50px; } .sf_content { padding-left:27px; padding-top:21px; float: left; width: 600px; } * html .sf_content { padding-left:0px; width: 700px; } /** * ------------------------------------------------------------------ * @section FOOTER * ------------------------------------------------------------------ */ .sf_footer{ width: 425px; margin: 0px auto; padding-top: 60px; padding-bottom: 20px; } a:hover { text-decoration: none; } * html a {position:realtive} Sorry for the huge post and thanks for taking the time to read and any help you may offer! B.D.Smith What is the best practice for giving an <a> a different color than the underline? Background image? <a><span></span></a>? Something else? Is there a cleaner way to achieve what I'm doing below? I read a bit about pseudo-selectors, not sure if they can be applied to this. Code: <style> .class1 {float:left;width:100px;background:first_tab.jpg } .class2 {float:left;width:100px;background:tab.jpg } .class3 {float:left;width:100px;background:last_tab.jpg } </style> <div class="clearfix"> <div class="class1"> Home </div> <div class="class2"> About Us </div> <div class="class3"> Privacy </div> </div> Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <div style="background-color: red;"><input type="radio" id="radio"></div> </body> </html> Viewing this simple test page in a broswer shows that IE and Mozilla both vertically align the radio button differently within its "box" as well as giving it a different number of pixels of padding and/or margin on all 4 sides. Are there any tricks to getting consistency? i was able to have the image button links hover and change colors using 2 different image buttons, however i came to realize that i want to have the hovered image stay active once the button is clicked. can someone assist me with this? this is what my code looks like: Code: a:hover#index { background: url("./images/home-red.png") 0 0 no-repeat; } a:hover#howto { background: url("./images/howtobuild-red.png") 0 0 no-repeat; } a:hover#installation { background: url("./images/installation-red.png") 0 0 no-repeat; } a:hover#design { background: url("./images/dande-red.png") 0 0 no-repeat; } a:hover#dean { background: url("./images/deansblog-red.png") 0 0 no-repeat; } a:hover#forum { background: url("./images/userforum-red.png") 0 0 no-repeat; } a:hover#plan { background: url("./images/planbike-red.png") 0 0 no-repeat; } a:hover#search { background: url("./images/search-red.png") 0 0 no-repeat; } a#index, a#design, a#howto, a#installation, a#dean, a#forum, a#plan, a#search { width: 86px; height: 27px; float: left; margin-top:6px; position:relative; left: 115px; } a#index { background: url("./images/home-grey.png"); } a#design { background: url("./images/dande-grey.png"); } a#howto { background: url("./images/howtobuild-grey.png"); } a#installation { background: url("./images/installation-grey.png"); } a#dean { background: url("./images/deansblog-grey.png"); } a#forum { background: url("./images/userforum-grey.png"); } a#plan { background: url("./images/planbike-grey.png"); } a#search { background: url("./images/search-grey.png"); } Hi, I have an unordered list displaying contact info for several people. For example: name1 address1 phone1 name2 address2 phone2 name3 address3 phone3 I'd like there to be a blank line between each person's info (just like it is displayed above). To do this, I added line breaks after each list item's closing tag. Here is the code: Code: <ul> <li>name1<br />address1<br />phone1<br /></li><br /> <li>name2<br />address2<br />phone2<br /></li><br /> <li>name3<br />address3<br />phone3<br /></li><br /> </ul> In Safari and Firefox (Mac and Win) there is a blank line between each section of contact info (the desired effect). In IE6, there is no blank line. It looks like this: name1 address1 phone1 name2 address2 phone2 name3 address3 phone3 I'm sure there is a fix out there, I just haven't found it yet. Any help is appreciated. - Tim If you look at my page here in IE and Firefox, you'll see that the footer is stretched in IE. It's barely showing the image, but flooding over into the center of the page. I have no idea why it'd be doing this. View in IE View in FF Here's the CSS used : Code: #footer { background: #49515C url(img/header_right.gif) no-repeat 100%; border-bottom: 5px solid #fff; border-top: 10px solid #fff; text-align: center; color: #fff; font-size: 0.8em; padding: 10px; line-height: 16px; clear: both; } Can anyone see a problem? I had a similar problem earlier this week and it turned out to be solved by changing the encoding of my php files to ASCII instead of the default UTF-8 set by MS Expression Web. The problem I have now is that one of my pages looks wrong in IE7. The same page looks fine in IE8, FireFox 3, Chrome, Opera, and Safari. This is what it looks like in IE7: This is what it looks like in IE8 and all the other browsers mentioned above: The page can be seen he http://dev.asbco.com/products/commercialindustrial/ Any help is greatly appreciated! Thanks! I have two images, the first (nameplate) i have set to be ontop and centered, whose left side "hits" the side of the window when the window gets small enough like its supposed to. The second is set beneath it (silverplate) and is smaller than nameplate(1500x800). I want this to be centered too so that when the browser is resized it follows the nameplate and doesnt move against it or go out of window. I cant seem to achieve this effect with any combination of positioning and nested divs, the silverplate always goes off the left side of the window and tracks different than the nameplate. Why dont both images behave the same? How would i make them do that? Code: <style> #nameplate { top:0px; height:1500px; z-index:90; height:1500px; overflow:visible; } .img { position:relative; display:inherit; margin-left:auto; margin-right:auto; } </style> </head> <body bgcolor="#00FF33" style="margin:0px; padding:0px; max-height:1500px; overflow:visible;"> <div id="nameplate"> <img src="Assets/NamePlate.png" style=" z-index:98; opacity:0.5;" class="img" /> <img src="Assets/SilverPlate.png" style="z-index:95; left:-300px; top: -1000px; width:100px; height:100px;" class="img"/> </div> Ok so i initially put my CSS iwthin my HTML document as it was just going to be a test page. I then thought of expanding it into an actual site so wanted to transfer the CSS coding on and external CSS stylesheet. However when doing this the layers pull to the left and out of line .. any problem causing this? Also .. i know i have used position:absolute; tags, and using them is frowned upon when used on all layers. But without these, once again the layers again, are pulled to the left, any help would be fantastic. Regards, Joe. CSS within the XHTML document: Code: <style type="text/css"> <!-- body { margin: -10px; /*/*/margin: 0; /* */ padding: 0; color: black; background: white; background-image: url(images/bg%20copy.png); } #content { position:absolute; width:200px; height:78px; z-index:1; left: 112px; top: 0px; } #nav { position:absolute; border:#000000; border-width:thin; width:142px; height:320px; z-index:2; left: 123px; top: 109px; } .style { background:#A01B1E none repeat scroll 0%; border:1px solid #000000; } #aff { position:absolute; width:137px; height:29px; z-index:3; left: 123px; top: 553px; } .style1 {font-size: 12px} #news1 { position:absolute; width:200px; height:43px; z-index:4; left: 307px; top: 108px; } #news2 { position:absolute; width:200px; height:115px; z-index:5; left: 307px; top: 278px; } #xtreme { position:absolute; width:27px; height:38px; z-index:6; left: 860px; top: 15px; } --> </style> |