CSS - Web Design Newbie, Css 'problem'
Similar TutorialsOn the right side of this page the border is messed up but, in the css the mathematics are all correct. I dont know whats wrong??? Have a look at the output of this code he Code: <html> <head> <title>Template</title> <style type="text/css"> <!-- #header { border-top: #000000 thin solid; border-left: #000000 thin solid; border-right: #000000 thin solid; position:absolute; left:5%; top:30px; width:90%; height:178px; } #nav { border-left: #000000 thin solid; border-bottom: #000000 thin solid; position:absolute; left:5%; top:208px; width:18%; height:512px; } #content { border-right: #000000 thin solid; border-bottom: #000000 thin solid; position:absolute; left:23%; top:208px; width:72%; height:512px; } --> </style> </head> <body> <div id='header'> </div> <div id='nav'> </div> <div id='content'> </div> </body> </html> Whats wrong??? Daniel Hello every body, I am just learning how to place the elements of a website using css design (I want to be a better designer :P) here is the problem: http://trustedonlinepharmacy.com/dev/ I have this divs Id s: Code: #container { width:760px; margin:0px auto 0px auto; text-align:left; } #pageHeader { display:block; height:140px; width:760px; background:url("trusted.gif") no-repeat; } #content { background-image: url('textfull.gif'); background-repeat: repeat-y; width:760px; } #ptext { position:relative; top:10px; left:170px; width:570px; padding-left:10px; padding-right:10px; background-image : url('pills.jpg'); background-repeat: no-repeat; background-position: bottom right; } #linkList{ position:absolute; top:150px; width:150px; text-align: left; } this is the html code using the divs: Code: <div id="container"> <div id="pageHeader"></div> <div id="content"> <div id="ptext"> ... ptext code <br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br> </div> <div id="linkList"> link list code.... ...... </div> <div id="footer"> ... footer code </div> </div> </div> the problem is that i have to add <br> in the ptext div for get fill the end of the page of the backgroud (textfull.gif), I want to know if i can do it in another way without the <br>, just an auto mode, and if I can make it look the same in firefox and IE... thanx to every body Here is my design. Look at it in IE and/or Firefox. Everything looks right. Now look at it in Opera. You can see some of the "wrapper" layer, which I've given a pink background. Is there any way to fix this? Here is my code: Code: <html> <head> <style type="text/css"> body { background: #3e1f00 url(../images/background.gif); background-position: top center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 80%; color: #FFFFFF; margin-top:30px; } #top { background: red; position: relative; margin-left: auto; margin-right: auto; width: 758px; height: 167px; text-align: left; } #wrapper { position: relative; margin: 0 auto; width: 758px; background: pink; } #middle { position: relative; margin: 0 auto; width: 758px; height: 200px; text-align: left; background: yellow; } #bottom { position: relative; margin-left: auto; margin-right: auto; width: 758px; height: 23px; text-align: left; background: green; } /*** see http://www.positioniseverything.net/easyclearing.html for explanation of Tony Aslett's elegant hack ***/ .clearing:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearing { display: inline-block; } /* hides from IE/Mac \*/ * html .clearing { height: 1%; } .clearing { display: block; } /* end hide from IE-Mac */ /*** end clearing hack ***/ </style> </head> <body> <center> <div id="top"> TOP </div> <div id="wrapper" class="clearing"> <div id="middle"> MIDDLE </div> </div> <div id="bottom"> BOTTOM </div> </center> </body> </html> look at my site. it is very boxy and almost TOO structured. is there a design trick i can use to mix it up a little? specific examples would be greatly appreciated. Hi there folks, Im about to go insane with this one. My site is akamarketing.com and you will notice on the left there is various elements about me & my blog which display fine in IE but the text continues across (without confining to its parent div width specification) in opera and firefox. According to my stats 25% are firefox so I do of course need to fix this issue. The css and html for one broken section is Code: <div align=center style="text-align:CENTER; border:<?=$bordersize ?>px dashed #000000; margin:2px; width:185px; padding:2px; margin-top:2px; margin-bottom:0px; padding 7px; float:left; margin-left:7px; padding-bottom:0px;"> <table border=0 style="border:0px dashed black;"><tr><td style="text-align:left;"><img title="David Callan" style="margin: 0px 5px 0px 0px; padding-top: 0px; border: #000000 1px solid" alt="David Callan" src="http://www.akamarketing.com/images/davesmall.gif" align="left" vspace="0" hspace="0"/>Welcome. I'm <a href="http://www.akamarketing.com/blog/about-dave/" title="Read more about Dave on our blog"><font color="#22229C">Dave Callan</font></a>, a 24 year old SEOer & Web developer from Ireland. I've been doing design, development, seo, ppc, Internet marketing etc. since I was about 15. This site is my canvas!</td></tr></table> </div> Can anyone help me with this? I've tried a couple of things mostly around float properties but no joy. Thanks in advance for any help. Howdy. Disclaimer: I've been working on a redesign of my homepage, and I decided to go 100% CSS. I'm still learning CSS, so if this has a braindead easy solution, just laugh and point it out to me. The problem: Here is the design I have for my website (forgive the ascii art): Code: +------------------------------------------------------+ | Header | +--------------+---------------------------------------+ | Stuff Bar | Content : :Google | | | : : Ad | | Navigation | : : | | | : : | | Firefox | : : | | Info Box | : +.......| | | : | | Affiliates | : | | | : | +--------------+---------------------------------------+ | Footer | +------------------------------------------------------+ The Content has been artificially "width"ed to be no more than 400px wide. The Google Ad should float all the way to the right on a separate layer to keep out of the way on large monitors. Now, what I want to do is also float every IMAGE from the content all the way to the right on large monitors: Code: +------------------------------------------------------+ | Header | +--------------+---------------------------------------+ | Stuff Bar | Content : :Google | | | : : Ad | | Navigation | : : | | | : : | | Firefox | : : | | Info Box | : +.......| | | : | | Affiliates | : | | | : ------------------------ | | | : +---------------------+ | | | : | IMAGE from Content | | | | : +---------------------+ | | | : ------------------------ | | | : | | | : | +--------------+---------------------------------------+ | Footer | +------------------------------------------------------+ I havn't a clue how to do that correctly. I want the Content to wrap around the image callout. I'd appreciate the pointer. As soon as I add this code for the rule, the apple on left side drops below the rule. It belongs in the upper left corner. #body #rule { margin-top: 100px; align: center; spartaumc.com/contact_us2.html spartaumc.com/SpryAssets/sparta3.css Hello, Ive been coding with CSS for about 2 weeks now. I have recently created this site and have tested it in IE and Firefox. Everything is fine but my Navigation. I have linked to a screenshot of the navs in each browser. Internet Explorer: http://panik.owphosting.com/nav1.jpg FireFox: http://panik.owphosting.com/nav2.jpg Here is my CSS: Code: img { border: 0px none; } body{ background-color: #ffffff; color: #000; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; font-family: Verdana,sans-serif; font-size:10px } table { color: #000; padding: 0; margin:0; border: 0px none; font-size:11px } h1 { font-family: arial; font-size:18px } h2 { font-family: arial; font-size:16px } a:link { color: #000099; font-weight: bold; text-decoration: none; } a:visited { color: #000099; font-weight: bold; text-decoration: none; } a:active { color: #000099; font-weight: bold; text-decoration: none; } a:hover { color: #99cc33; } .cssnav{ width: 144px; height: 25px; padding: 0; margin: 0; } .cssnav a { width: 144px; height: 25px; color: #fff; background: #99cc33; border-right: 2px solid #d6f0a3; border-left: 2px solid #d6f0a3; padding-left: 5px; padding-top: 5px; margin-top: 1px; margin-bottom: 1px; } .cssnav a:visited { width: 144px; height: 25px; color: #fff; background: #99cc33; border-right: 2px solid #d6f0a3; border-left: 2px solid #d6f0a3; padding-left: 5px; padding-top: 5px; margin-top: 1px; margin-bottom: 1px; } .cssnav a:hover { width: 144px; height: 25px; color: #000; background: #d6f0a3; border-right: 2px solid #d6f0a3; border-left: 2px solid #d6f0a3; padding-left: 5px; padding-top: 5px; margin-top: 1px; margin-bottom: 1px; } table#sidebar { background: #99CC33; } table#thetable { } table#thetable td.sidebar2 { } .sidebar { background: #99CC33; border-right: 2px solid #000; } table#sidebar td.blockhead { background: #c5e586; color: #000; text-align: center; font-weight: bold; font-size: 10pt; } .footer { background: #FF9933; color: #000; text-align: center; font-size: 8pt; border-top: 2px solid #000; } .footer a{ color: #fff; } .footer a:visited{ color: #fff; } .footer a:hover{ color: #000; } .cat { color: #ff9933; font-size: 16px; font-weight: bold; } .lightgreen { background: #69A583; } .headbar { background: #FF9933; border-top: 2px solid #000; border-bottom: 2px solid #000; padding: 2px; text-align: right; } And Here is the code for the Dynamicly generated navigation (PHP): PHP Code: <TR> <TD> <div class="cssnav"><a href="index.php">Home</a></div> <?php $nav_query = "SELECT name FROM catagories ORDER BY id"; $nav_result = mysql_query($nav_query) or die ("Navigation Query Error"); $nav_numofrows = mysql_num_rows($nav_result); for($i = 0; $i < $nav_numofrows; $i++) { $nav_row = mysql_fetch_array($nav_result); echo '<div class="cssnav"><a href="catagory.php?id=' . $nav_row['name'] .'">' . $nav_row['name'] . '</a></div>'; } ?> <div class="cssnav"><a href="http://panik.owphosting.com/wkforum/index.php" target=_blank>Forum</a></div> </TD> </TR> thanks hi, just started with css and im having trouble centering 3 columns in a container. Code: <div id="container"> <div id="content"> <h1>Title Header</h1> <div id="top"> <div class="col"> <h2>Section Header</h2> <p>Lorem ipsum est cu voluptatum efficiantur deterruisset, nec et solum lucilius argumentum, eum ei regione bonorum suavitate. Lorem nonummy suscipiantur sit cu, id eum soluta putant. Sale porro rationibus mei no. Vis ut primis virtute nostrud, sea an malis menandri definiebas, his agam ancillae delectus ei. Ei deleniti noluisse interesset quo, vis at quem scriptorem cotidieque. Sit an virtute gubergren expetendis, at ludus dolor accusam per.</p> </div> <div class="col"> <h2>Section Header</h2> <p>Ferri docendi nec ut. Viris tamquam ad quo, nam admodum facilisis adolescens ut, usu meis iriure tractatos at. Ei duo eros qualisque elaboraret, paulo vivendo inciderint an duo, mea eius exerci constituam cu. Ne facer exerci appetere vis, id dicat malorum mel, an sed ferri ludus aliquyam. Ut omnis meliore praesent usu, te sit quas tempor moderatius, accusam voluptua eam at. Duo agam etiam facilisi eu, cum an aeque congue contentiones, id omnium persecuti sadipscing sit. Ne eum invidunt laboramus, eum error nostro ad.</p> </div> <div class="col"> <h2>Section Header</h2> <p>Quem feugiat adipisci no sed, simul solet mandamus ut sea, no vocent corrumpit argumentum per. Cu iisque facilisi insolens est, posse nonummy adipisci vel ut. An has nibh natum dissentias, te lorem legere posidonium eam, te quodsi prompta euripidis sed. Ne noluisse petentium cum, sed utroque offendit recteque eu. Te cum petentium disputando, id duo oratio fuisset gloriatur, in sed timeam ponderum.</p> </div> </div> <div class="clear"></div> </div> <div id="footer"> <h3>Footer Header</h3> </div> </div> css: Code: * { margin: 0; padding:0; border: 0; } body { background-color: gray; text-align:center; } #container { width: 900px; background-color:white; margin: auto; } #content { } #top { margin: auto; } .col { margin: auto; width: 267px; float: left; text-align: left; } .clear { clear: both; } #footer { clear: both; } this obviously doesnt work. and has some serious issues. if not, coded wrong altogether. im free to any suggestions as far as my div markups and what i should be doing to keep code efficient. i also am wondering what the keyword 'auto' mean in css. ive searched all around and never found a good exp or example explaining what it is. again, the css is pretty screwed. i added and deleted so much that i cant even remember what i did and getting a little frustrated in the process. thanks in advance for the response. It looks alright in IE, but looks really messed up in Mozilla, Firefox and Netscape. I wanted vertical UL tabs down the left side. http://www.members.shaw.ca/welcomehere/test.htm please help. Hi sorry if this is the wrong place for this thread, I have been given a project to take a fully flash website and convert it into xhtml and css. There are roughly 30 pages or so but Im am really unsure of how much I should be asking as a fixed price for the work. What does everyone else usually do? I'm designing a company website. I'm relatively new to CSS and I'm having trouble creating what seems to me a very simple design:
body background: fixed full page image
banner: fixed, 100 pixels high, full-width, transparent background
nav bar: fixed, 200 px wide, auto-height, opaque nav icons, semi-transparent tiled image background
content box: scrolling, auto height, auto width, opaque text, semi-transparent tiled image background
footer: fixed, 30 px high, full width, transparent background
mockup: Here is as far as I could get in the actual design: web page attemp Hi, How do i make a table in which "title" is in the middle of the table and "help" is on right side. <table class="" width="700"> <tr><td colspan="2" align="center"> <span>title</span><span>help</span> </td></tr></table> something like this: ------------------------------------------------------ |...................................title...........................help | ------------------------------------------------------ Thank you. Hey everyone, I'm new to CSS, but now web design. I could find a way to build this design in tables, but thought I might try the CSS thing. I've been reading a bunch and have a general plan, but any advice on where my plan could be improved or if I should stick with tables would be great. hutec-inc. com/personal/css.gif Hi, I have a table, which contains div. The Div contains "ul" and "li" elements. Currently my page looks awkward without any css designs. Could somebody help me with some css designs, so that page looks good. Thank you. I am new to this forum and need some help! I am creating a page and the sidebar has links. I have a graphic link that I DO NOT want highlighted. I have tried everything I can think of, but I don't think I am able to apply the link styling as an inline style, or am I wrong. Any help would be appreciated! http://annesweb.com/abramoff/ I am trying to improve design of most popular div in one section (http://www.pearl.ru/isdunyasi/defaultinner.asp?Section=3). I designed something in photoshop but I am having hard time wth integrating it(http://www.pearl.ru/isdunyasi/newtable.gif). I cannot figure out how to do it because if I set what I designed as a background there is big chance texts will overflow as that area gets its values from the database. Code: #innersubcontentpopular{ float:right; width:300px; height:450px; background:#FFFFFF url(images/nheadlines_bg.gif) top no-repeat; } #innersubcontentpopular h1{ padding:0px; margin-bottom:5px; font-size:14px; font-weight:bold; color:#FFFFFF; } #innersubcontentpopular h2 { padding:5px 2px 5px 2px; font-size:12px; font-weight:bold; color:#aaaaaa; } #innersubcontentpopular p { padding:2px; margin:0; font-size:12px; } Ok, trying to use CSS to mirror the UNLV design header. examples of the design: http://hotel.unlv.edu/ http://alumni.unlv.edu/ etc I basically want the top header (black/red backgrounds) I am trying to do it without using tables to do the layout, but I can't seem to figure out how to do it. here is what I got: http://projects.whiteazn.com/unlvmentor/ in firefox, looks fine, except the black background doesn't seem to go all the way over. in IE, works fine, but the red background seems to get bigger (the height is bigger) and the search box seems to go to the top any ideas? (I haven't tried to float the red background part yet) Ok, this may be asking too much, but I have this design idea - http://tmh.netdbs.com/turnkey2.jpg But insofar as laying it out with CSS, I just am not sure where to begin breaking it apart and creating various divs so to speak, the main white area is where I will lay out various <P> tags and won't have a problem with that, but it is getting started that challenges me. I'd appreciate some feedback on how to approach this. TOm |