Archives for posts with tag: web design

Warning: This post may not be comprehendable by people who don’t do CSS/HTML.

The site I’ve created for my psych lab presented a frustrating float problem: I needed to have a title icon relatively positioned so that it overlapped the border of the content <div>, but I also needed all images, which are floated, to fit completely within the content <div> as well. Usually, to force floated images to stay within a <div>, you can put { overflow: hidden } for the <div>, but if I did this here, it would cut off my title icon. And that was just plain ugly.

Hence my journey into messy absolute positioning of the title icon, inserting ten thousand <p>&nbsp;</p> to fill up the extra space beside the abnormally large map to our lab, and self-questioning of whether that title icon was really necessary. That is when Google gave me an ingeniously simple solution I should’ve thought of when the problem first cropped up: Dump a single <p>&nbsp;</p> that is set to { clear: both }.

No, it’s not the prettiest solution — it’s best if everything can be controlled by CSS, or something outside of the HTML file — but I will have to live with it for now. Besides, it’s better than seeing this in the page source:

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<!— plzdontlookatmycode —>

Advertisements

I have a headache right now, but I thought I might as well write something in order to…well, not neglect my blog again.

Life has been extremely busy lately. Yeah, it’s only the third week of the second semester, but everything seems to require more work than last semester. O.o Furthermore, I’ve delved back into the awesome world of web design \o/ for both the linguistic department’s student union and the moral development lab of which I’m a part of. Web design and coding in CSS/XHTML has taken a lot longer than I expected, probably because I haven’t written any code whatsoever in the past two years. >.> Basically, these past couple of weeks have been a crash course in coding. (I’m not complaining though; it has been great to just DESIGN again, instead of memorizing terms from textbooks. Also, CSS3 is TOTALLY AWESOME. Go text-shadow!)

Besides that, there’s also a lot of other stuff going on. But yeah.

Excuse me while I go take a walk. Hopefully, some fresh air will clear my head.

%d bloggers like this: