CSS - Newbie Css Question... Please Forgive Me If I'm Being Stupid
Hi guys,
I'm new to CSS so pleaz forgive me if the following questions are stupid. 1/ Let's say we have in traditional HTML this: <img src=".."><font class=""><b>French Jokes</b></font> <br> <img src=".."><font class=""><b>French (Freedom) Fries</b></font> <br> <img src=".."><font class=""><b>F*** Jacques Chirac</b></font> <br> <img src=".."><font class=""><b>A bas la France</b></font> Now how should I write that in plain CSS? (I know I cannot use <b>, nor <font> tags). I suppose the <p> tag, correct? Something like: <img src=".."><p id="cat_title">French Jokes</p> <br> <img src=".."><p id="cat_title">French (Freedom) Fries</p> <br> <img src=".."><p id="cat_title">F*** Jacques Chirac</p> <br> <img src=".."><p id="cat_title">A bas la France</p> My problem with CSS is not the table design with float and so on but rather how to lay out a page combining many fonts (some on the same line), some <b> and some <u>'s, some font tags etc. (should I choose <span> rather than <p>?, <div>, rather than <p>, <b> or <strong>, etc, etc ,etc) Thank you for your help. Cheers Andreas Similar TutorialsHi im a relative newbie and am having a really annoying and stupid problem. I have a 3 column layout but the 3rd column "rightcolumn" for some reason is in the 2nd column "middlecolumn". It would seem like there's a missing </div> but i can't figure it out. any help would be awesome source: kdpatton.com/test.htm I have this: all my css files in one subdomain, html.website.com all my iamges in another subdomain, images.website.com i link my stylesheet: <link href="http://html.website.com/html/style.css" rel="stylesheet" type="text/css" /> and in the CSS: background:#333 url("../images/bodybg.png") repeat-x fixed top center; does not work. i have to put the whole domain in there? as far as relative paths, since the image is relative from the path of the location of the stylesheet? so I would think ../images/ should work? I've got limited experience with CSS and I've never done anything with divs, only tables. So my question is really, really, really basic: Not being as adept at CSS as I could be, especially positioning, I'm sort of at a loss as to how to best structure my page using divs. Looking at the comp at http://homework.describe.org/esdcar_home.jpg, would it be best to make everything from the top to the start of the brown bar at the bottom and from the left to the start of the picture one "column" (with nested divs), with everything to the right of the picture's edge a second "main content" column with nested divs inside it? Or should I make one header div that runs from left to right until either above or below the navigation (?), and everything below that point be a 2-column layout (until the brown bar at the bottom)? Does it matter one way or the other? Will it one day be clear to me immediately exactly how best to divide up and structure a page from a comp? Am I just a confused soul, or does everyone kind of struggle with this at the beginning? Sorry to ask such basic questions, but... Thanks in advance. T. Hi all, I need to have two CSS stylesheets that change the background color of my page. All I need to know is the CSS code to change the background color. Cheers. hi there i am quite new to css and i would appreciate your help. i would like to make the following thing : my gallery contains 10 images (600/400 pixel) i would like to make one single page that shows only one photo at a time and has (text or icon) links to the other 9 images ... of course it would be nice to have some minimalistic transition effect between the images too but if its too much for you i am mainly interested in the functionality part if this (as so many things) has been made as a tutorial i will be glad to get a link too thanks zs Hello all... it's been brought to my attention that css is a solid method to build sites. my question is this; would css work well for a website that displays a variety of products stored in a database and brought up via php. the page length would vary depending on the number of products per section etc... also, i typically generate my pages in photoshop/image ready (being a designer ahead of a developer)...are sliced images easily useable in css? Thanks in advance! I need to build web page like this. Is it possible to make it with divs. I believe it is, but I can't manage how. Can you please help me with my little problem? Thanks in advance! Hey everyone! I'm brand spankin' new to the forum, but hopefully I'll become a regular fixture here! I have a real estate agent client that I am doing SEO for, but my duties have expanded (a little outside my expertise) into the website itself. I can't post hyperlinks (which precludes me pasting code here) so this should be an interesting task of explaining my problem! Currently, there is a vertical navigation bar on the left side of the page that is simply an < ul > of hyperlinks. So, for example, if the list item was "Brooklyn", it would return a search of the MLS listings for the city of Brooklyn. The client wants these hyperlinks to instead go to pop-out menus. So, the tab would still say "Brooklyn", but there would be two popout items "Brooklyn Brownstones" and "Brooklyn Apartments" for example. The original tab would no longer hyperlink to search results, but the pop outs would link to results for their specific parameters. The current template is using <ul class="navSec"> to accomplish the nav bar. I cannot write code (aside from HTML) from scratch. I can, however tweak and edit existing code in .css, .php, .js etc. If there is any way you can help me, I'd appreciate it. Since I can't link the site, I can tell you it is Maui Just Listed (all one word) with the dot and then the com. Eileen Could someone take a look at http://nexleads.com/projdemos/fc/test.html and tell me why it;s fine in IE and not in firefox ?? I undertsand that firefox is right and IE isn't, but could you point me to the right direction ? Thanks !! I have one link on a web page that I want the default colors to appear on. How do I turn off A:link, A:visited, A:active, & A:hover styles for one single link? I want all the other links to remain as they are presently set with CSS. Also, I want the font attribute(s) to remain set for the link in question. Thanks, Thad As the title says, I just started learning HTML/CSS, cause our robotics group need to have a website, and all that. Sooo....first, I did a basic (photoshop) outline of how it should look like, and all. -since I can't post picture links for some reason, I'm not sure how can I explain this...- And so, I tried my hands on CSS, and all. And well...I succeeded, and failed...ish. Basically, I tried to make the menu. While it looked fine and all, I think I mis assigned my CSS styling, so whatever I type in the <html> is now considered part of it. I tried to id the links out, but I don't think I did it correctly, or that's the wrong way to do it. >__> . To be specific, I want to place some text around, but they start at midway down for no reason, and the same goes for images with hyperlink. So I'm assuming it's still thinking whatever I'm typing is still considered part of the "menu". So is there a way to well, isolate the menu out, or something? Code: </body> </html> <html> <head> <style type="text/css"> a:link,a:visited { display:block; font-weight:500; font-family:Arial; letter-spacing: 1px; color:#FFFFFF; background-color:#3366cc; width:145px; text-align:center; padding:6px; text-decoration:none; position:relative; left:8px; bottom:-83px; } a:hover,a:active { background-color:#99ccff; } </style> </head> <head> <style type="text/css"> body { background-image:url('http://img220.imageshack.us/img220/3707/backgroundtesteq.jpg'); background-repeat:no-repeat; } </style> </head> <html> <a href="http://facebook.com" target="_blank">ABOUT US</a> <a href="http://google.com" target="_blank">JOINING US</a> <a href="http://youtube.com" target="_blank">THE FRC</a> <a href="http://tvtropes.org" target="_blank">OUR ROBOT</a> <a href="http://fanfiction.net" target="_blank">2011</a> <a href="http://thegame.youlostit.com" target="_blank">EVENTS</a> <a href="http://ihotrobotics.org" target="_blank">PREVIOUS YEARS</a> <a href="http://aischool.org" target="_blank">COMMUNITY</a> <a href="http://questionmark.com" target="_blank">SPONSORS</a> </html> So uh, can anyone help tell me what's the problem? =x Thank you very much. hey all, ive got a newbie question here, just got a book and am trying some things but can figure out this.. i have the following Code: ul, li { display: inline; margin: 10; padding: 15; font-weight: bold; font-style: italic; } <ul> <li><span align="center" class="normal">Image 1</span></li> <li><span align="center" class="normal">Image 2</span></li> <li><span align="center" class="normal">Image 3</span></li> <li><span align="center" class="normal">Image 4 </span></li> <li><span align="center" class="normal">Image 5</span></li> </ul> and the prints age 1 Image 2 Image 3 Image 4 Image 5 which is good but ide like to have the following age 1 Image 2 Image 3 Image 4 Image 5 age 1 Image 2 Image 3 Image 4 Image 5 i have tried this Code: <ul> <li><span align="center" class="normal">Image 1</span></li> <li><span align="center" class="normal">Image 2</span></li> <li><span align="center" class="normal">Image 3</span></li> <li><span align="center" class="normal">Image 4 </span></li> <li><span align="center" class="normal">Image 5</span></li> </ul><br> <ul> <li><span align="center" class="normal">Image 1a</span></li> <li><span align="center" class="normal">Image 2a</span></li> <li><span align="center" class="normal">Image 3a</span></li> <li><span align="center" class="normal">Image 4a </span></li> <li><span align="center" class="normal">Image 5a</span></li> </ul> but it isn't quite right, basically i want to implement a 2 row 5 colum table using this method...is there another way of doing it?? thanks in advance RF I keep seeing the same things online "Make the body container 100%" Tried that and it still isn't working. Site is http://www.columbusindiearts.com/indexfull.html and here is the code Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <style> body { background-color: #999999; height:100%; width:100%; } div#outer { background-color: #FFFFFF; display: table; width:600px; height:100%; margin-left:auto; margin-right:auto; } </style> </head> <body> <div id="outer"> test </div> </body> </html> What am I doing wrong? need it to work in IE7 and Firefox. Hosted on linux Apache Hi, First, before you get on my case, I'm using a table, because that's what the teacher wanted. And as I've never worked with CSS, let alone divs, I was more comfortable with it anyhow. Okay, the question I have is probably very dumb, and the answer very simple, but I'm not getting it. I'm just trying to get an image aligned to the top of a cell. http://esdcar.org/web/test/templatem2.html I could use valign in the cell tag, and it almost works (but it doesn't quite align at the top, about 5px short), but I'd like to do it with CSS, especially as I'm going to have a different header image on every page. The cell has its own id of contentm. Inside the img src tag, I put class="pageheader." In the stylesheet, I gave .pageheader an attribute of vertical-align: top. But, it's not working. What am I doing wrong? hi all. i am trying to leave the world of table formatting and need a bit of help i have a container div with two divs in it the first div has an image in it that should sit at the bottom, like so: _____________________ logo div ____IMG______________| __nav div_____________| i have the following code as my css: #container{ margin-left:60px; border:1px dotted black; } #logo{ margin-top:60px; width: 395px; height: 140px; background-color:#EBEBEB; padding: 10px 0px 0px 20px; } #nav{ margin-top:5px; height: 25px; width: 395px; background-color:#FFFF00; padding: 10px 0px 0px 20px; } img { display: block; border: 0; } img.bt { display: block; vertical-align: bottom; } and my html: <div id="container"> <div id="logo"><img src="i/logotype.gif" class="bt"></div> <div id="nav">Practice Areas | Firm Profile | News | Attorneys</div> </div> it is not vertical aligning to bottom. can anyone help me? i am testing on mac ie5 and safari for super @ssyness!! but i want it to work everywhere if possible. i am sure it is something simple, but im not sure what it is thanks a lot everyone. Hello and thanks for your patience. I have a page here that is having a positioning problem for "sidebar2". I can't seem to get it to stick to that right side of the page in a fixed position. Code: @charset "UTF-8"; * { margin: 0px; padding: 0px; } body { text-align: center; font-family: Arial, Helvetica, sans-serif; font-size: 0.8em; color: #32240C; line-height: 1.5em; } a:link { color:#C42617; } a:hover { color: #687ABB; } a:visited { color:#C42617; } a:active { color: #687ABB; } h2 { font-size: 1.2em; line-height: 2.3em; color: #34260b; border-left-width: thin; border-left-style: double; border-left-color: #34260b; text-indent: 10px; background-repeat: no-repeat; } #clear { clear: both; } #welcome { color: #325084; float: left; width: 590px; text-align: left; padding: 15px; border: thin solid #D0DAEF; background-color: #FFF; margin-left: 25px; margin-right: 5px; } #welcome h2 { padding-left: 2px; } #welcome p { padding-left: 2px; } input { width: 185px; } /* reset width for non-text inputs */ input.radio, input.checkbox, input.submit, input.dropdown { width:auto; } /* display labels next to form elements add a class for when you want them to stack */ label { float: left; margin-right: 1em; } label.top { display: block; float: none; } .sidebar2 { position:absolute; top:182px; right: 150px; text-align:left; width: 255px; padding-top: 0px; padding-right: 0; padding-bottom: 10px; padding-left: 10px; margin-top: 0px; } .sidebarheader { color:#D75500; padding-bottom: 5px; font-weight: bold; font-style: italic; font-size: 16px; } ul { list-style: none; margin: 0; padding: 0; } img { border: none; } /*- Menu 3--------------------------- */ #menu3 { width: 250px; border-style: solid solid none solid; border-color: #BCD2E6; border-size: 1px; border-width: 1px; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; font-size: 12px; } #menu3 li a { height: 32px; voice-family: "\"}\""; voice-family: inherit; height: 24px; text-decoration: none; } #menu3 li a:link, #menu3 li a:visited { color: #325084; display: block; background: url(menu3.gif); padding: 8px 0 0 10px; } #menu3 li a:hover { color: #627EB7; background: url(menu3.gif) 0 -32px; padding: 8px 0 0 10px; } #affiliates { color: #325084; float: left; width: 580px; text-align: left; margin-left: 25px; margin-right: 15px; } #affiliates table td { padding: 15px; } Can you tell me how format that div? 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. Hi, Whats going on with my site in FF? It works fine in MAxthon. http://www.wnv2.com/?wn=tutorials&type=photoshop all the tutorials are messed up ==and== www.wnv2.com There is not bottom!!! Thanks at least i think it's a stupid little css problem ... i've attached 3 png's so you can see the problem i'm trying solve. what i'm doing is i have a DIV that holds an icon that's floated to the left and another DIV that houses a message. these two DIV's are then sorrounded by a DIV that's supposed to put a border around everything (the icon and the message). look at the png named "good" ... that looks fine. the text wraps around the floated icon sorta like what you might see in a newspaper, which is the effect that i'm going for. however, when you widden the window you get "no-good." the border that's supposed to go around everything now intersects the icon. now if i had enough text in the message, no matter how wide the window is, the text would always force the border to sorround everything. but i can't always be positive that the amount of text would always match what is needed. now take a look at "fixed.png" ... this is how i would like it to look. the border always sorrouinding everything. now i was under the impression that when a DIV sorrounds another DIV, the outer most DIV takes on the shape of the DIV inside (the basic box object model). this doesn't seem to be the case with a div that's floated though. it always seems to hang outside of the outer most DIV, and i think it's a behavioral issue. my question is: is there a style property that i must invoke on the outer most DIV to make it display this way? or is what i'm attempting to do impossible? i don't think it should be impossible or i would deem that as a drastic flaw in css. i'll also post my code: Code: <div style="border:#ff0000 solid 1px"><!-- full wrapper --> <div style="background-color:#00ff00; border:#666666 solid 1px; float:left; margin:1px; padding:1px"><!-- float wrapper --> <div><img alt="image" src="img.bmp"></div> <div style="background-color:#cccccc; margin-top:1px"><!-- caption wrapper --> <div style="text-align:center">caption</div> </div><!-- end caption --> </div><!-- end float --> <div style="background-color:#0000ff"><!-- message area --> <div style="padding:5px; text-align:justify">This is some text. Actually it's very long text that goes on and on and on. It's also a test entry. Testing, testing, 1, 2, 3 ... 1, 2 ... 1, 2, 3. Good it appears that the test has passed with flying colors. It gets a gold star put next to it's name on the blackboard.</div> </div><!-- end message --> </div><!-- end full wrapper --> thanks for any feedback, except telling me that my color scheme is lousy. i'm aware of that; i use high-contrast colors in the implementation phase so i can see exactly what is going on. -z |